summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-08-06 16:47:36 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-08-06 16:47:36 +0000
commitae2a18ac114c2abc0b9358142ece9d7a93ae10be (patch)
treea904b2eba26c0db2d8b64ad6a6cf71221f5f558f /src
parentFix bug #1241501, improve tooltip text on path parameter (diff)
downloadinkscape-ae2a18ac114c2abc0b9358142ece9d7a93ae10be.tar.gz
inkscape-ae2a18ac114c2abc0b9358142ece9d7a93ae10be.zip
Fix for bug #1348375 (randomized stars change on translation)
Fixed bugs: - https://launchpad.net/bugs/1348375 (bzr r13495)
Diffstat (limited to 'src')
-rw-r--r--src/sp-star.cpp8
1 files changed, 5 insertions, 3 deletions
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<Inkscape::SnapCandidatePoint> &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;