diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2017-05-05 16:52:19 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2017-05-05 16:52:19 +0000 |
| commit | bec0359a0d5b3f7db96417f003927c282c18a9f4 (patch) | |
| tree | e45fa17927826da138e233499060e3142de86899 /src/live_effects/parameter/vector.cpp | |
| parent | Update to trunk (diff) | |
| parent | merge lpeUpdDefaultParams (diff) | |
| download | inkscape-bec0359a0d5b3f7db96417f003927c282c18a9f4.tar.gz inkscape-bec0359a0d5b3f7db96417f003927c282c18a9f4.zip | |
Update to trunk
(bzr r13645.1.174)
Diffstat (limited to 'src/live_effects/parameter/vector.cpp')
| -rw-r--r-- | src/live_effects/parameter/vector.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/live_effects/parameter/vector.cpp b/src/live_effects/parameter/vector.cpp index 55b4d4b32..470fa9c2d 100644 --- a/src/live_effects/parameter/vector.cpp +++ b/src/live_effects/parameter/vector.cpp @@ -48,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) { |
