[librsvg: 10/31] with_discrete_layer: don't leave the user_space_params coordinate space pushed
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 10/31] with_discrete_layer: don't leave the user_space_params coordinate space pushed
- Date: Thu, 3 Jun 2021 02:27:10 +0000 (UTC)
commit 5333a7a9650a1c1f2747776fc8faf461c80d6ea3
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Jun 2 16:27:02 2021 -0500
with_discrete_layer: don't leave the user_space_params coordinate space pushed
This doesn't affect anything, but it will hopefully make it more clear
that a) the coordinate space is not changing, anyway; b) it is only
for normalizing lengths, not for drawing just yet.
src/drawing_ctx.rs | 7 +++++--
src/filter.rs | 4 +++-
2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/drawing_ctx.rs b/src/drawing_ctx.rs
index 6f8dd894..734029fa 100644
--- a/src/drawing_ctx.rs
+++ b/src/drawing_ctx.rs
@@ -735,8 +735,11 @@ impl DrawingCtx {
// being resolved in userSpaceonUse units, since that is the default
// for primitive_units. So, get the corresponding NormalizeParams
// here and pass them down.
- let view_params = temporary_draw_ctx.push_coord_units(CoordUnits::UserSpaceOnUse);
- let user_space_params = NormalizeParams::new(values, &view_params);
+ let user_space_params = {
+ let view_params =
+ temporary_draw_ctx.push_coord_units(CoordUnits::UserSpaceOnUse);
+ NormalizeParams::new(values, &view_params)
+ };
(
temporary_draw_ctx.run_filters(
diff --git a/src/filter.rs b/src/filter.rs
index a4ea4eb0..48db7335 100644
--- a/src/filter.rs
+++ b/src/filter.rs
@@ -125,7 +125,9 @@ impl FilterValue {
node_being_filtered_name,
),
- FilterValue::Function(ref func) => func.to_filter_spec(user_space_params, current_color),
+ FilterValue::Function(ref func) => {
+ func.to_filter_spec(user_space_params, current_color)
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]