summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2010-07-26 23:43:02 +0000
committerJohan Engelen <goejendaagh@zonnet.nl>2010-07-26 23:43:02 +0000
commit22cce088046ec5cfeff1ca9c7afe4aa8998ebe46 (patch)
treecfc10f6c60f347cfb5d0a94721e43e2f27c7670d /src/live_effects/parameter
parentFix initial combo box values in filter effects dialog (diff)
downloadinkscape-22cce088046ec5cfeff1ca9c7afe4aa8998ebe46.tar.gz
inkscape-22cce088046ec5cfeff1ca9c7afe4aa8998ebe46.zip
more powerstroke build infrastructure
(bzr r9656)
Diffstat (limited to 'src/live_effects/parameter')
-rw-r--r--src/live_effects/parameter/CMakeLists.txt1
-rw-r--r--src/live_effects/parameter/Makefile_insert2
-rw-r--r--src/live_effects/parameter/array.cpp16
3 files changed, 19 insertions, 0 deletions
diff --git a/src/live_effects/parameter/CMakeLists.txt b/src/live_effects/parameter/CMakeLists.txt
index 2fa0d5bc6..8657b2bec 100644
--- a/src/live_effects/parameter/CMakeLists.txt
+++ b/src/live_effects/parameter/CMakeLists.txt
@@ -5,6 +5,7 @@ parameter.cpp
path.cpp
path-reference.cpp
point.cpp
+powerstrokepointarray.cpp
random.cpp
text.cpp
unit.cpp
diff --git a/src/live_effects/parameter/Makefile_insert b/src/live_effects/parameter/Makefile_insert
index 74b166e8b..99cd88d62 100644
--- a/src/live_effects/parameter/Makefile_insert
+++ b/src/live_effects/parameter/Makefile_insert
@@ -16,6 +16,8 @@ ink_common_sources += \
live_effects/parameter/path-reference.h \
live_effects/parameter/path.cpp \
live_effects/parameter/path.h \
+ live_effects/parameter/powerstrokepointarray.cpp \
+ live_effects/parameter/powerstrokepointarray.h \
live_effects/parameter/text.cpp \
live_effects/parameter/text.h \
live_effects/parameter/unit.cpp \
diff --git a/src/live_effects/parameter/array.cpp b/src/live_effects/parameter/array.cpp
index c576bedd5..d1c30edf7 100644
--- a/src/live_effects/parameter/array.cpp
+++ b/src/live_effects/parameter/array.cpp
@@ -12,6 +12,7 @@
#include "svg/stringstream.h"
#include <2geom/coord.h>
+#include <2geom/point.h>
namespace Inkscape {
@@ -35,6 +36,21 @@ ArrayParam<float>::readsvg(const gchar * str)
return newx;
}
+template <>
+Geom::Point
+ArrayParam<Geom::Point>::readsvg(const gchar * str)
+{
+ gchar ** strarray = g_strsplit(str, ",", 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) {
+ return Geom::Point(newx, newy);
+ }
+ return Geom::Point(Geom::infinity(),Geom::infinity());
+}
+
} /* namespace LivePathEffect */
} /* namespace Inkscape */