Getting colder with our second freeze... it's 3.31.91 release day and string freeze, upload a tarball and lock those strings 🏂

draw_in_viewport(): Don't pass an affine to the callback; it's implicit now

parent d2ebff93
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment