Code

Remove oncanvas_editable attribute for PointParams; use their internal shape settings...
authorcilix42 <cilix42@users.sourceforge.net>
Fri, 4 Jul 2008 11:24:40 +0000 (11:24 +0000)
committercilix42 <cilix42@users.sourceforge.net>
Fri, 4 Jul 2008 11:24:40 +0000 (11:24 +0000)
src/live_effects/effect.cpp
src/live_effects/parameter/point.cpp
src/live_effects/parameter/point.h

index 73ba7387a1901392b36c8439bbf9af9892d0891b..11e5b504871bfc13a7968f2c355f069ff16a2ac0 100644 (file)
@@ -423,7 +423,8 @@ Effect::addPointParamHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem
         if ((*p)->paramType() == POINT_PARAM) {
             PointParam *pparam = static_cast<PointParam *>(*p);
             KnotHolderEntity *e = dynamic_cast<KnotHolderEntity *>(*p);
-            e->create(desktop, item, knotholder, pparam->handleTip());
+            e->create(desktop, item, knotholder, pparam->handleTip(),
+                      pparam->knotShape(), pparam->knotMode(), pparam->knotColor());
             knotholder->add(e);
         }
     }
index fa78ae6a4985ac764ec288960e3a5b55ac45bca8..220b618f7569d2595276571108a4c0c93e477159 100644 (file)
@@ -35,11 +35,9 @@ PointParam::PointParam( const Glib::ustring& label, const Glib::ustring& tip,
                         Effect* effect, const gchar *htip, Geom::Point default_value)
     : Geom::Point(default_value), Parameter(label, tip, key, wr, effect), defvalue(default_value)
 {
-    oncanvas_editable = true;
-
-    knot_shape = SP_KNOT_SHAPE_SQUARE;
+    knot_shape = SP_KNOT_SHAPE_DIAMOND;
     knot_mode  = SP_KNOT_MODE_XOR;
-    knot_color = 0x00ff0000;
+    knot_color = 0xffffff00;
     handle_tip = g_strdup(htip);
 }
 
index bbd4d815e0c89dc24c1ea5b10254798d0522404f..4c0e6e356f016e8cc2a078267feaec00a1cfdfbb 100644 (file)
@@ -52,6 +52,9 @@ public:
     virtual void param_transform_multiply(Geom::Matrix const& /*postmul*/, bool /*set*/);
 
     void set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint32 color);
+    SPKnotShapeType knotShape() { return knot_shape; }
+    SPKnotModeType knotMode() { return knot_mode; }
+    guint32 knotColor() { return knot_color; }
 
     /* these are overloaded from KnotHolderEntity */
     virtual void knot_set(NR::Point const &p, NR::Point const &origin, guint state);