From d79181f44325e63e35ef9e9653543b4bc09976bb Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Mon, 16 Mar 2026 14:22:37 -0400 Subject: [PATCH] fix: transform of tiny-skia rotation reverts changes from upstream that have broken svg rotation --- tiny_skia/src/vector.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tiny_skia/src/vector.rs b/tiny_skia/src/vector.rs index 889a3c0d..59cd1993 100644 --- a/tiny_skia/src/vector.rs +++ b/tiny_skia/src/vector.rs @@ -43,10 +43,8 @@ impl Pipeline { if let Some(image) = self.cache.borrow_mut().draw( handle, color, - Size::new( - (bounds.width * transform.sx) as u32, - (bounds.height * transform.sy) as u32, - ), + // XX Do not apply transform scaling for rotation to the size + Size::new((bounds.width) as u32, (bounds.height) as u32), ) { // XX Do not apply transform scaling for rotation to the position pixels.draw_pixmap( @@ -58,7 +56,7 @@ impl Pipeline { quality: tiny_skia::FilterQuality::Bicubic, ..tiny_skia::PixmapPaint::default() }, - Transform::default(), + transform, clip_mask, ); }