summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 59dcc40)
raw | patch | inline | side by side (parent: 59dcc40)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Sat, 15 Sep 2007 21:45:42 +0000 (21:45 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Sat, 15 Sep 2007 21:45:42 +0000 (21:45 +0000) |
src/live_effects/lpe-skeletalstrokes.cpp | patch | blob | history | |
src/live_effects/lpe-skeletalstrokes.h | patch | blob | history | |
src/live_effects/parameter/parameter.cpp | patch | blob | history |
index e1c54b4cf9c15e9102f0d24387090073e8cfdf99..31d4cfc2f556d3b7470e4d0814682cd8fcd4a1aa 100644 (file)
pattern(_("Pattern source"), _("Path to put along the skeleton path"), "pattern", &wr, this, "M0,0 L1,0"),\r
copytype(_("Pattern copies"), _("How many pattern copies to place along the skeleton path"), "copytype", SkelCopyTypeConverter, &wr, this, SSCT_SINGLE_STRETCHED),\r
prop_scale(_("Width"), _("Width of the pattern"), "prop_scale", &wr, this, 1),\r
- scale_y_rel(_("Width in units of length"), _("Scale the width of the pattern in units of its length"), "scale_y_rel", &wr, this, false)\r
+ scale_y_rel(_("Width in units of length"), _("Scale the width of the pattern in units of its length"), "scale_y_rel", &wr, this, false),\r
+ spacing(_("Spacing"), _("Space between copies of the pattern"), "spacing", &wr, this, 0),\r
+ normal_offset(_("Normal offset"), "", "normal_offset", &wr, this, 0),\r
+ tang_offset(_("Tangential offset"), "", "tang_offset", &wr, this, 0),\r
+ vertical_pattern(_("Pattern is vertical"), "", "vertical_pattern", &wr, this, false)\r
{\r
registerParameter( dynamic_cast<Parameter *>(&pattern) );\r
registerParameter( dynamic_cast<Parameter *>(©type) );\r
registerParameter( dynamic_cast<Parameter *>(&prop_scale) );\r
registerParameter( dynamic_cast<Parameter *>(&scale_y_rel) );\r
+// registerParameter( dynamic_cast<Parameter *>(&spacing) );\r
+// registerParameter( dynamic_cast<Parameter *>(&normal_offset) );\r
+// registerParameter( dynamic_cast<Parameter *>(&tang_offset) );\r
+ registerParameter( dynamic_cast<Parameter *>(&vertical_pattern) );\r
\r
prop_scale.param_set_digits(3);\r
prop_scale.param_set_increments(0.01, 0.10);\r
n = force_continuity(remove_short_cuts(n,.1));\r
\r
D2<Piecewise<SBasis> > patternd2 = make_cuts_independant(pattern);\r
- Piecewise<SBasis> x=Piecewise<SBasis>(patternd2[0]);\r
- Piecewise<SBasis> y=Piecewise<SBasis>(patternd2[1]);\r
+ Piecewise<SBasis> x = vertical_pattern.get_value() ? Piecewise<SBasis>(patternd2[1]) : Piecewise<SBasis>(patternd2[0]);\r
+ Piecewise<SBasis> y = vertical_pattern.get_value() ? Piecewise<SBasis>(patternd2[0]) : Piecewise<SBasis>(patternd2[1]);\r
Interval pattBnds = bounds_exact(x);\r
x -= pattBnds.min();\r
Interval pattBndsY = bounds_exact(y);\r
index 1bd28668053876f55989632e11043d178aa805bc..919f09b8ec15d83c4a8f56bbc5ca862fb2823b15 100644 (file)
EnumParam<SkelCopyType> copytype;\r
ScalarParam prop_scale;\r
BoolParam scale_y_rel;\r
+ ScalarParam spacing;\r
+ ScalarParam normal_offset;\r
+ ScalarParam tang_offset;\r
+ BoolParam vertical_pattern;\r
\r
void on_pattern_pasted();\r
\r
index bb7ea4c9e7f4dca3cb2b0c47230e4296c18fc066..faed7c389d6cce0d725544f3e157dcada07a2fce 100644 (file)
ScalarParam::param_make_integer(bool yes)\r
{\r
integer = yes;\r
+ digits = 0;\r
+ inc_step = 1;\r
+ inc_page = 10;\r
if (rsu) {\r
- rsu->getS()->setDigits(0);\r
- rsu->getS()->setIncrements(1, 10);\r
+ rsu->getS()->setDigits(digits);\r
+ rsu->getS()->setIncrements(inc_step, inc_page);\r
}\r
}\r
\r
rsu = new Inkscape::UI::Widget::RegisteredScalar();\r
rsu->init(param_label, param_tooltip, param_key, *param_wr, param_effect->getRepr(), param_effect->getSPDoc());\r
rsu->setValue(value);\r
- if (integer)\r
- param_make_integer();\r
rsu->getS()->setDigits(digits);\r
rsu->getS()->setIncrements(inc_step, inc_page);\r
\r