Skip to content

Commit

Permalink
Fix dead code warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenzV committed May 6, 2024
1 parent 45f0867 commit 800a998
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions crates/resvg/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,29 +138,6 @@ fn render_group(
Some(())
}

pub trait TinySkiaPixmapMutExt {
fn create_rect_mask(
&self,
transform: tiny_skia::Transform,
rect: tiny_skia::Rect,
) -> Option<tiny_skia::Mask>;
}

impl TinySkiaPixmapMutExt for tiny_skia::PixmapMut<'_> {
fn create_rect_mask(
&self,
transform: tiny_skia::Transform,
rect: tiny_skia::Rect,
) -> Option<tiny_skia::Mask> {
let path = tiny_skia::PathBuilder::from_rect(rect);

let mut mask = tiny_skia::Mask::new(self.width(), self.height())?;
mask.fill_path(&path, tiny_skia::FillRule::Winding, true, transform);

Some(mask)
}
}

pub fn convert_blend_mode(mode: usvg::BlendMode) -> tiny_skia::BlendMode {
match mode {
usvg::BlendMode::Normal => tiny_skia::BlendMode::SourceOver,
Expand Down

0 comments on commit 800a998

Please sign in to comment.