We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a82bad9 + c5da885 commit 842a897Copy full SHA for 842a897
canvas/src/lib.rs
@@ -552,7 +552,7 @@ impl CanvasRenderingContext2D {
552
where I: CanvasImageSource, L: CanvasImageDestLocation {
553
let dest_size = dest_location.size().unwrap_or(src_location.size());
554
let scale = dest_size / src_location.size();
555
- let offset = dest_location.origin() - src_location.origin();
+ let offset = dest_location.origin() - src_location.origin() * scale;
556
let transform = Transform2F::from_scale(scale).translate(offset);
557
558
let pattern = image.to_pattern(self, transform);
0 commit comments