From efcaaaf38289ebf771c0b8a0cec29a5976164f45 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Wed, 6 Aug 2014 15:27:37 -0400 Subject: Fix mistake introduced in r13495 (bzr r13498) --- src/sp-star.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/sp-star.cpp') diff --git a/src/sp-star.cpp b/src/sp-star.cpp index 712029468..a9bb946c2 100644 --- a/src/sp-star.cpp +++ b/src/sp-star.cpp @@ -516,7 +516,6 @@ void SPStar::snappoints(std::vector &p, Inkscape:: Geom::Affine SPStar::set_transform(Geom::Affine const &tform) { Geom::Affine xform = (randomized == 0 ? tform.withoutTranslation() : tform); - // Only set transform with proportional scaling if (!xform.isUniformScale()) { return xform; @@ -528,7 +527,7 @@ Geom::Affine SPStar::set_transform(Geom::Affine const &tform) } /* Calculate star start in parent coords. */ - Geom::Point pos( this->center * xform ); + Geom::Point pos( this->center * tform ); /* This function takes care of translation and scaling, we return whatever parts we can't handle. */ -- cgit v1.2.3 From 0fea5bc6928fcd9b6b7ccc3434d4a7b3147c775f Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Wed, 6 Aug 2014 15:36:33 -0400 Subject: Fix another mistake introduced in r13495 (bzr r13499) --- src/sp-star.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/sp-star.cpp') diff --git a/src/sp-star.cpp b/src/sp-star.cpp index a9bb946c2..a43d681ce 100644 --- a/src/sp-star.cpp +++ b/src/sp-star.cpp @@ -513,9 +513,8 @@ void SPStar::snappoints(std::vector &p, Inkscape:: } } -Geom::Affine SPStar::set_transform(Geom::Affine const &tform) +Geom::Affine SPStar::set_transform(Geom::Affine const &xform) { - Geom::Affine xform = (randomized == 0 ? tform.withoutTranslation() : tform); // Only set transform with proportional scaling if (!xform.isUniformScale()) { return xform; @@ -527,7 +526,7 @@ Geom::Affine SPStar::set_transform(Geom::Affine const &tform) } /* Calculate star start in parent coords. */ - Geom::Point pos( this->center * tform ); + Geom::Point pos( this->center * xform ); /* This function takes care of translation and scaling, we return whatever parts we can't handle. */ -- cgit v1.2.3 From 7a0d091a5e5599ceff0eb4c20f7b6e818057e5c1 Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Wed, 6 Aug 2014 21:45:33 -0400 Subject: Redo the fix for bug #1348375 (bzr r13500) --- src/sp-star.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/sp-star.cpp') diff --git a/src/sp-star.cpp b/src/sp-star.cpp index a43d681ce..97a690520 100644 --- a/src/sp-star.cpp +++ b/src/sp-star.cpp @@ -515,8 +515,9 @@ void SPStar::snappoints(std::vector &p, Inkscape:: Geom::Affine SPStar::set_transform(Geom::Affine const &xform) { + bool opt_trans = (randomized == 0); // Only set transform with proportional scaling - if (!xform.isUniformScale()) { + if (!xform.withoutTranslation().isUniformScale()) { return xform; } @@ -530,7 +531,7 @@ Geom::Affine SPStar::set_transform(Geom::Affine const &xform) /* This function takes care of translation and scaling, we return whatever parts we can't handle. */ - Geom::Affine ret(xform); + Geom::Affine ret(opt_trans ? xform.withoutTranslation() : xform); gdouble const s = hypot(ret[0], ret[1]); if (s > 1e-9) { ret[0] /= s; -- cgit v1.2.3