[librsvg: 15/21] Remove dbg! swap transform order Also fix default scale in x and y scales
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 15/21] Remove dbg! swap transform order Also fix default scale in x and y scales
- Date: Tue, 31 Aug 2021 18:37:37 +0000 (UTC)
commit 016fe46d572488d1de639a5b98d7455a63d06881
Author: Madds H <madds hollandart io>
Date: Tue Aug 24 17:47:02 2021 -0500
Remove dbg! swap transform order
Also fix default scale in x and y scales
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/576>
src/transform.rs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/transform.rs b/src/transform.rs
index 0872c057..d7ab2d12 100644
--- a/src/transform.rs
+++ b/src/transform.rs
@@ -49,7 +49,7 @@ impl TransformProperty {
if let TransformProperty::List(l) = self {
for f in l.iter() {
- let t = match f {
+ let transform_matrix = match f {
TransformFunction::Matrix(xx, yx, xy, yy, x0, y0) => {
Transform::new_unchecked(*xx, *yx, *xy, *yy, *x0, *y0)
}
@@ -59,14 +59,14 @@ impl TransformProperty {
TransformFunction::TranslateX(h) => Transform::new_translate(h.length, 0.0),
TransformFunction::TranslateY(v) => Transform::new_translate(0.0, v.length),
TransformFunction::Scale(x, y) => Transform::new_scale(*x, *y),
- TransformFunction::ScaleX(x) => Transform::new_scale(*x, 0.0),
- TransformFunction::ScaleY(y) => Transform::new_scale(0.0, *y),
+ TransformFunction::ScaleX(x) => Transform::new_scale(*x, 1.0),
+ TransformFunction::ScaleY(y) => Transform::new_scale(1.0, *y),
TransformFunction::Rotate(a) => Transform::new_rotate(*a),
TransformFunction::Skew(ax, ay) => Transform::new_skew(*ax, *ay),
TransformFunction::SkewX(ax) => Transform::new_skew(*ax, Angle::new(0.0)),
TransformFunction::SkewY(ay) => Transform::new_skew(Angle::new(0.0), *ay),
};
- final_transform = dbg!(final_transform.post_transform(&t));
+ final_transform = transform_matrix.post_transform(&final_transform);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]