summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 25596a2)
raw | patch | inline | side by side (parent: 25596a2)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 31 Aug 2007 16:17:13 +0000 (16:17 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 31 Aug 2007 16:17:13 +0000 (16:17 +0000) |
src/live_effects/lpe-curvestitch.cpp | patch | blob | history | |
src/live_effects/lpe-curvestitch.h | patch | blob | history | |
src/live_effects/parameter/bool.h | patch | blob | history |
index b0e8dc8f7106cc0333159a46e3f9339ea7a58120..f595a9553cd07b62cd2905d9fbdda9ff7fad9d0c 100644 (file)
strokepath(_("Stroke path"), _("The path that will be stroked, whatever, think of good text here."), "strokepath", &wr, this, "M0,0 L1,0"),\r
nrofpaths(_("Nr of paths"), _("The number of paths that will be generated."), "count", &wr, this, 5),\r
startpoint_variation(_("Startpoint variation"), _("..."), "startpoint_variation", &wr, this, 0),\r
- endpoint_variation(_("Endpoint variation"), _("..."), "endpoint_variation", &wr, this, 0)\r
+ endpoint_variation(_("Endpoint variation"), _("..."), "endpoint_variation", &wr, this, 0),\r
+ scale_y(_("Scale stroke y"), _("Scale the height of the stroke path with its length"), "scale_stroke_y", &wr, this, false)\r
{\r
registerParameter( dynamic_cast<Parameter *>(&nrofpaths) );\r
registerParameter( dynamic_cast<Parameter *>(&startpoint_variation) );\r
registerParameter( dynamic_cast<Parameter *>(&endpoint_variation) );\r
registerParameter( dynamic_cast<Parameter *>(&strokepath) );\r
+ registerParameter( dynamic_cast<Parameter *>(&scale_y) );\r
\r
nrofpaths.param_make_integer();\r
nrofpaths.param_set_range(2, NR_HUGE);\r
\r
Matrix transform;\r
transform.setXAxis( (end-start) / scaling );\r
- transform.setYAxis( rot90(unit_vector(end-start)));\r
+ gdouble scaling_y = scale_y.get_value() ? L2(end-start)/scaling : 1.0;\r
+ transform.setYAxis( rot90(unit_vector(end-start)) * scaling_y);\r
transform.setTranslation( start );\r
Piecewise<D2<SBasis> > pwd2_out = (strokepath-stroke_origin) * transform;\r
+ // add stuff to one big pw<d2<sbasis> > and then outside the loop convert to path?\r
std::vector<Path> result = Geom::path_from_piecewise(pwd2_out, LPE_CONVERSION_TOLERANCE);\r
path_out[i] = result[0];\r
tA += incrementA;\r
index 1853e378ffe49d4e7c7369a62c071202d25128f5..571996a7cc89f770c157deb6757a9193ec960de4 100644 (file)
#include "live_effects/effect.h"\r
#include "live_effects/parameter/path.h"\r
#include "live_effects/parameter/parameter.h"\r
+#include "live_effects/parameter/bool.h"\r
\r
namespace Inkscape {\r
namespace LivePathEffect {\r
ScalarParam nrofpaths;\r
ScalarParam startpoint_variation;\r
ScalarParam endpoint_variation;\r
+ BoolParam scale_y;\r
\r
LPECurveStitch(const LPECurveStitch&);\r
LPECurveStitch& operator=(const LPECurveStitch&);\r
index cf8c9c94d4302c34a3eeeacd6d5d00043d856fc5..24c10fb3b3f24b272f8fc9893ef1cc4bdc770996 100644 (file)
void param_setValue(bool newvalue);\r
void param_set_default();\r
\r
+ bool get_value() { return value; };\r
+\r
private:\r
BoolParam(const BoolParam&);\r
BoolParam& operator=(const BoolParam&);\r