Code

fix transformation of LPECurveStitch when "Scale width relative" is set
authorjohanengelen <johanengelen@users.sourceforge.net>
Thu, 17 Jan 2008 21:43:33 +0000 (21:43 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Thu, 17 Jan 2008 21:43:33 +0000 (21:43 +0000)
src/live_effects/lpe-curvestitch.cpp
src/live_effects/lpe-curvestitch.h

index d3b1f6c12ce2ad08ffdde78253ff8c059e75bb0f..98814eab0ef09d0853b31d5aa32e4d63362aa8ff 100644 (file)
@@ -165,6 +165,22 @@ LPECurveStitch::resetDefaults(SPItem * item)
     strokepath.param_set_and_write_new_value( path.toPwSb() );
 }
 
+void
+LPECurveStitch::transform_multiply(Geom::Matrix const& postmul, bool set)
+{
+    // only take translations into account
+    if (postmul.isTranslation()) {
+        strokepath.param_transform_multiply(postmul, set);
+    } else if (!scale_y_rel.get_value()) {
+  // this basically means that for this transformation, the result should be the same as normal scaling the result path
+  // don't know how to do this yet.
+//        Geom::Matrix new_postmul;
+        //new_postmul.setIdentity();
+//        new_postmul.setTranslation(postmul.translation());
+//        Effect::transform_multiply(new_postmul, set);
+    }
+}
+
 } //namespace LivePathEffect
 } /* namespace Inkscape */
 
index 0cb6b492eec30f234b14cd02dd1a59ed87f6f4e3..a0050760ceb750c3a3677b8b163d0deb5016e82b 100644 (file)
@@ -32,6 +32,8 @@ public:
 
     virtual void resetDefaults(SPItem * item);
 
+    virtual void transform_multiply(Geom::Matrix const& postmul, bool set);
+
 private:
     PathParam strokepath;
     ScalarParam nrofpaths;