Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tiny_skia/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ impl Engine {
self.vector_pipeline.draw(
&svg.handle,
svg.color,
physical_bounds,
*bounds,
svg.opacity,
_pixels,
transform,
Expand Down
11 changes: 7 additions & 4 deletions tiny_skia/src/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,20 @@ impl Pipeline {
if let Some(image) = self.cache.borrow_mut().draw(
handle,
color,
Size::new(bounds.width as u32, bounds.height as u32),
Size::new(
(bounds.width * transform.sx) as u32,
(bounds.height * transform.sy) as u32,
),
) {
pixels.draw_pixmap(
bounds.x as i32,
bounds.y as i32,
(bounds.x * transform.sx) as i32,
(bounds.y * transform.sy) as i32,
image,
&tiny_skia::PixmapPaint {
opacity,
..tiny_skia::PixmapPaint::default()
},
transform,
Transform::default(),
clip_mask,
);
}
Expand Down
Loading