diff options
-rw-r--r-- | rsvg_internals/src/draw.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rsvg_internals/src/draw.rs b/rsvg_internals/src/draw.rs index 7d5417f9..796da292 100644 --- a/rsvg_internals/src/draw.rs +++ b/rsvg_internals/src/draw.rs @@ -461,13 +461,13 @@ pub fn draw_surface( let width = f64::from(width); let height = f64::from(height); - let mut bbox = BoundingBox::new(&affine); - bbox.rect = Some(cairo::Rectangle { + // This is the target bbox after drawing. + let bbox = BoundingBox::new(&affine).with_rect(Some(cairo::Rectangle { x, y, - width, - height, - }); + width: w, + height: h, + })); set_affine_on_cr(draw_ctx, &cr); cr.scale(w / width, h / height); |