mirror of
https://github.com/italicsjenga/vello.git
synced 2025-01-10 12:41:30 +11:00
format
This commit is contained in:
parent
37a9763748
commit
207ab45f16
|
@ -82,7 +82,10 @@ pub fn render_svg(sb: &mut SceneBuilder, svg: &PicoSvg, print_stats: bool) {
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
pub fn render_tiger(sb: &mut SceneBuilder, print_stats: bool) {
|
pub fn render_tiger(sb: &mut SceneBuilder, print_stats: bool) {
|
||||||
use super::pico_svg::*;
|
use super::pico_svg::*;
|
||||||
let xml_str = std::str::from_utf8(include_bytes!("../../piet-wgsl/examples/assets/Ghostscript_Tiger.svg")).unwrap();
|
let xml_str = std::str::from_utf8(include_bytes!(
|
||||||
|
"../../piet-wgsl/examples/assets/Ghostscript_Tiger.svg"
|
||||||
|
))
|
||||||
|
.unwrap();
|
||||||
let start = std::time::Instant::now();
|
let start = std::time::Instant::now();
|
||||||
let svg = PicoSvg::load(xml_str, 8.0).unwrap();
|
let svg = PicoSvg::load(xml_str, 8.0).unwrap();
|
||||||
if print_stats {
|
if print_stats {
|
||||||
|
|
|
@ -22,7 +22,8 @@ pub use pinot::FontRef;
|
||||||
|
|
||||||
// This is very much a hack to get things working.
|
// This is very much a hack to get things working.
|
||||||
// On Windows, can set this to "c:\\Windows\\Fonts\\seguiemj.ttf" to get color emoji
|
// On Windows, can set this to "c:\\Windows\\Fonts\\seguiemj.ttf" to get color emoji
|
||||||
const FONT_DATA: &[u8] = include_bytes!("../../piet-wgsl/examples/assets/third-party/Roboto-Regular.ttf");
|
const FONT_DATA: &[u8] =
|
||||||
|
include_bytes!("../../piet-wgsl/examples/assets/third-party/Roboto-Regular.ttf");
|
||||||
|
|
||||||
pub struct SimpleText {
|
pub struct SimpleText {
|
||||||
gcx: GlyphContext,
|
gcx: GlyphContext,
|
||||||
|
|
|
@ -307,7 +307,6 @@ impl<'a> From<&'a mut SceneFragment> for AnyScene<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn encode_blend_mode(mode: BlendMode) -> u32 {
|
fn encode_blend_mode(mode: BlendMode) -> u32 {
|
||||||
(mode.mix as u32) << 8 | mode.compose as u32
|
(mode.mix as u32) << 8 | mode.compose as u32
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue