From ae2a18ac114c2abc0b9358142ece9d7a93ae10be Mon Sep 17 00:00:00 2001 From: "Liam P. White" Date: Wed, 6 Aug 2014 12:47:36 -0400 Subject: Fix for bug #1348375 (randomized stars change on translation) Fixed bugs: - https://launchpad.net/bugs/1348375 (bzr r13495) --- src/sp-star.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/sp-star.cpp') diff --git a/src/sp-star.cpp b/src/sp-star.cpp index eac33ed7b..712029468 100644 --- a/src/sp-star.cpp +++ b/src/sp-star.cpp @@ -513,10 +513,12 @@ void SPStar::snappoints(std::vector &p, Inkscape:: } } -Geom::Affine SPStar::set_transform(Geom::Affine const &xform) +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.withoutTranslation().isUniformScale()) { + if (!xform.isUniformScale()) { return xform; } @@ -530,7 +532,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(Geom::Affine(xform).withoutTranslation()); + Geom::Affine ret(xform); gdouble const s = hypot(ret[0], ret[1]); if (s > 1e-9) { ret[0] /= s; -- cgit v1.2.3