summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/array.h
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-02-15 18:29:48 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-02-15 18:29:48 +0000
commit99fb2239028e72f8773bff39e43f7af33b4252d4 (patch)
tree23e96adea9f08b37f066559b28aac842cb230879 /src/live_effects/parameter/array.h
parentupdate to trunk (diff)
downloadinkscape-99fb2239028e72f8773bff39e43f7af33b4252d4.tar.gz
inkscape-99fb2239028e72f8773bff39e43f7af33b4252d4.zip
first steps
(bzr r13645.1.9)
Diffstat (limited to 'src/live_effects/parameter/array.h')
-rw-r--r--src/live_effects/parameter/array.h43
1 files changed, 35 insertions, 8 deletions
diff --git a/src/live_effects/parameter/array.h b/src/live_effects/parameter/array.h
index b93c7a617..9f26ed3e6 100644
--- a/src/live_effects/parameter/array.h
+++ b/src/live_effects/parameter/array.h
@@ -15,6 +15,9 @@
#include "live_effects/parameter/parameter.h"
+#include <2geom/satellite.h>
+#include <2geom/satellite-enum.h>
+#include <2geom/pointwise.h>
#include "svg/svg.h"
#include "svg/stringstream.h"
@@ -93,16 +96,40 @@ protected:
// separate items with pipe symbol
str << " | ";
}
- std::pair<int,Geom::satellite> pointwiseElement = dynamic_cast<std::pair<int,Geom::satellite> ><(_vector[i]);
- if(pointwiseElement){
- str << vector[i].first;
- str << " , ";
- str << vector[i].second;
- } else {
- str << vector[i];
- }
+ writesvgData(str,vector[i]);
}
}
+
+ void writesvgData(SVGOStringStream &str, float const &nVector) const {
+ str << nVector;
+ }
+
+ void writesvgData(SVGOStringStream &str, double const &nVector) const {
+ str << nVector;
+ }
+
+ void writesvgData(SVGOStringStream &str, Geom::Point const &nVector) const {
+ str << nVector;
+ }
+
+ void writesvgData(SVGOStringStream &str, std::pair<int, Geom::Satellite> const &nVector) const {
+ str << nVector.first;
+ str << " , ";
+ std::map<Geom::SatelliteType, gchar const *> stg = nVector.second.SatelliteTypeToGcharMap;
+ str << stg[nVector.second.satellitetype()];
+ str << " * ";
+ str << nVector.second.isTime();
+ str << " * ";
+ str << nVector.second.active();
+ str << " * ";
+ str << nVector.second.hasMirror();
+ str << " * ";
+ str << nVector.second.hidden();
+ str << " * ";
+ str << nVector.second.size();
+ str << " * ";
+ str <<nVector.second.time();
+ }
StorageType readsvg(const gchar * str);