[librsvg] draw_in_viewport(): Don't pass an affine to the callback; it's implicit now
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] draw_in_viewport(): Don't pass an affine to the callback; it's implicit now
- Date: Wed, 27 Sep 2017 16:44:06 +0000 (UTC)
commit 02a27e9eb780422ca6ba04d748c097e18b71da39
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Sep 27 11:35:06 2017 -0500
draw_in_viewport(): Don't pass an affine to the callback; it's implicit now
rust/src/structure.rs | 4 ++--
rust/src/viewport.rs | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/rust/src/structure.rs b/rust/src/structure.rs
index f1125e5..5d330d9 100644
--- a/rust/src/structure.rs
+++ b/rust/src/structure.rs
@@ -182,7 +182,7 @@ impl NodeTrait for NodeSvg {
self.preserve_aspect_ratio.get(),
drawing_ctx::get_current_state_affine(draw_ctx),
draw_ctx,
- |affine| {
+ || {
drawing_ctx::state_push(draw_ctx);
node.draw_children(draw_ctx, -1); // dominate==-1 so it won't reinherit or push
a layer
drawing_ctx::state_pop(draw_ctx);
@@ -310,7 +310,7 @@ impl NodeTrait for NodeUse {
symbol.preserve_aspect_ratio.get(),
drawing_ctx::get_current_state_affine(draw_ctx),
draw_ctx,
- |affine| {
+ || {
drawing_ctx::state_push(draw_ctx);
child.draw_children(draw_ctx, 1);
drawing_ctx::state_pop(draw_ctx);
diff --git a/rust/src/viewport.rs b/rust/src/viewport.rs
index 86113f1..12eb90b 100644
--- a/rust/src/viewport.rs
+++ b/rust/src/viewport.rs
@@ -15,7 +15,7 @@ pub fn draw_in_viewport<F>(vx: f64, vy: f64, vw: f64, vh: f64,
mut affine: cairo::Matrix,
draw_ctx: *const RsvgDrawingCtx,
draw_fn: F)
- where F: FnOnce(cairo::Matrix)
+ where F: FnOnce()
{
// width or height set to 0 disables rendering of the element
// https://www.w3.org/TR/SVG/struct.html#SVGElementWidthAttribute
@@ -59,7 +59,7 @@ pub fn draw_in_viewport<F>(vx: f64, vy: f64, vw: f64, vh: f64,
drawing_ctx::set_current_state_affine(draw_ctx, affine);
- draw_fn(affine);
+ draw_fn();
drawing_ctx::pop_discrete_layer(draw_ctx);
drawing_ctx::pop_view_box(draw_ctx);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]