[librsvg: 7/90] DrawingCtx::new() - No need to calculate a specific affine now
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 7/90] DrawingCtx::new() - No need to calculate a specific affine now
- Date: Tue, 26 Mar 2019 19:12:38 +0000 (UTC)
commit 16e81cba83a1561b2ab493df8a54e035d1d2d93c
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Mar 8 10:45:27 2019 -0600
DrawingCtx::new() - No need to calculate a specific affine now
rsvg_internals/src/drawing_ctx.rs | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/rsvg_internals/src/drawing_ctx.rs b/rsvg_internals/src/drawing_ctx.rs
index 57db2522..e85f2851 100644
--- a/rsvg_internals/src/drawing_ctx.rs
+++ b/rsvg_internals/src/drawing_ctx.rs
@@ -128,15 +128,13 @@ impl DrawingCtx {
// This is more or less a hack to make measuring geometries possible,
// while the code gets refactored not to need special cases for that.
- let (rect, vbox, affine) = if measuring {
+ let (rect, vbox) = if measuring {
(
cairo::Rectangle::new(0.0, 0.0, 1.0, 1.0),
ViewBox::new(0.0, 0.0, 1.0, 1.0),
- cairo::Matrix::identity(),
)
} else {
let rect = *viewport;
- let affine = cairo::Matrix::identity();
// https://www.w3.org/TR/SVG2/coords.html#InitialCoordinateSystem
//
@@ -157,7 +155,7 @@ impl DrawingCtx {
height: viewport.height,
};
- (rect, vbox, affine)
+ (rect, vbox)
};
let mut view_box_stack = Vec::new();
@@ -172,7 +170,7 @@ impl DrawingCtx {
cr: cr.clone(),
initial_cr: cr.clone(),
view_box_stack: Rc::new(RefCell::new(view_box_stack)),
- bbox: BoundingBox::new(&affine),
+ bbox: BoundingBox::new(&cairo::Matrix::identity()),
bbox_stack: Vec::new(),
drawsub_stack: Vec::new(),
acquired_nodes: Rc::new(RefCell::new(Vec::new())),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]