This commit is contained in:
Chad Brokaw 2022-11-26 14:41:30 -05:00
parent 37a9763748
commit 207ab45f16
3 changed files with 6 additions and 3 deletions

View file

@ -82,7 +82,10 @@ pub fn render_svg(sb: &mut SceneBuilder, svg: &PicoSvg, print_stats: bool) {
#[allow(unused)]
pub fn render_tiger(sb: &mut SceneBuilder, print_stats: bool) {
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 svg = PicoSvg::load(xml_str, 8.0).unwrap();
if print_stats {

View file

@ -22,7 +22,8 @@ pub use pinot::FontRef;
// 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
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 {
gcx: GlyphContext,

View file

@ -307,7 +307,6 @@ impl<'a> From<&'a mut SceneFragment> for AnyScene<'a> {
}
}
fn encode_blend_mode(mode: BlendMode) -> u32 {
(mode.mix as u32) << 8 | mode.compose as u32
}