diff options
| author | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:56:11 +0000 |
|---|---|---|
| committer | Michael Soegtrop <MSoegtrop@yahoo.de> | 2017-06-05 13:56:11 +0000 |
| commit | 7ee81350c73388881e60a59928d26764b7172c9b (patch) | |
| tree | b561a4dbbacd7eecbdbae3fa220a353375ccecf8 /src/live_effects/parameter/vector.cpp | |
| parent | updated to trunk (diff) | |
| parent | [Bug #1695016] Xaml export misses some radialGradients. (diff) | |
| download | inkscape-7ee81350c73388881e60a59928d26764b7172c9b.tar.gz inkscape-7ee81350c73388881e60a59928d26764b7172c9b.zip | |
merged with latest version of lpe-bool and trunk
(bzr r14862.2.3)
Diffstat (limited to 'src/live_effects/parameter/vector.cpp')
| -rw-r--r-- | src/live_effects/parameter/vector.cpp | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/src/live_effects/parameter/vector.cpp b/src/live_effects/parameter/vector.cpp index cfaa9e7e7..470fa9c2d 100644 --- a/src/live_effects/parameter/vector.cpp +++ b/src/live_effects/parameter/vector.cpp @@ -14,7 +14,6 @@ #include "svg/stringstream.h" #include "live_effects/effect.h" -#include "desktop.h" #include "verbs.h" namespace Inkscape { @@ -49,6 +48,25 @@ VectorParam::param_set_default() setVector(defvalue); } +void +VectorParam::param_update_default(Geom::Point default_point) +{ + defvalue = default_point; +} + +void +VectorParam::param_update_default(const gchar * default_point) +{ + gchar ** strarray = g_strsplit(default_point, ",", 2); + double newx, newy; + unsigned int success = sp_svg_number_read_d(strarray[0], &newx); + success += sp_svg_number_read_d(strarray[1], &newy); + g_strfreev (strarray); + if (success == 2) { + param_update_default( Geom::Point(newx, newy) ); + } +} + bool VectorParam::param_readSVGValue(const gchar * strvalue) { @@ -117,7 +135,7 @@ VectorParam::set_and_write_new_values(Geom::Point const &new_origin, Geom::Point void VectorParam::param_transform_multiply(Geom::Affine const& postmul, bool /*set*/) { - set_and_write_new_values( origin * postmul, vector * postmul.withoutTranslation() ); + set_and_write_new_values( origin * postmul, vector * postmul.withoutTranslation() ); } @@ -188,14 +206,14 @@ private: }; void -VectorParam::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) +VectorParam::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { VectorParamKnotHolderEntity_Origin *origin_e = new VectorParamKnotHolderEntity_Origin(this); - origin_e->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), ori_knot_shape, ori_knot_mode, ori_knot_color); + origin_e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), ori_knot_shape, ori_knot_mode, ori_knot_color); knotholder->add(origin_e); VectorParamKnotHolderEntity_Vector *vector_e = new VectorParamKnotHolderEntity_Vector(this); - vector_e->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), vec_knot_shape, vec_knot_mode, vec_knot_color); + vector_e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), vec_knot_shape, vec_knot_mode, vec_knot_color); knotholder->add(vector_e); } |
