diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-07-22 12:41:32 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-07-22 12:41:32 +0000 |
| commit | d90a75a8262153954445445a159b151f9aebca04 (patch) | |
| tree | c4cf94816f630a6b1ac42b4ff2812df1aad246aa /src/live_effects/lpe-ruler.cpp | |
| parent | Fix LP #250175 (broken undo in node tool) (diff) | |
| download | inkscape-d90a75a8262153954445445a159b151f9aebca04.tar.gz inkscape-d90a75a8262153954445445a159b151f9aebca04.zip | |
Scale parameter for lpe-ruler
(bzr r6393)
Diffstat (limited to 'src/live_effects/lpe-ruler.cpp')
| -rw-r--r-- | src/live_effects/lpe-ruler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/live_effects/lpe-ruler.cpp b/src/live_effects/lpe-ruler.cpp index 89da4efe3..bd60966c8 100644 --- a/src/live_effects/lpe-ruler.cpp +++ b/src/live_effects/lpe-ruler.cpp @@ -23,10 +23,12 @@ namespace LivePathEffect { LPERuler::LPERuler(LivePathEffectObject *lpeobject) : Effect(lpeobject), mark_distance(_("Mark distance"), _("Distance between ruler marks"), "mark_distance", &wr, this, 50), - mark_length(_("Mark length"), _("Length of ruler marks"), "mark_length", &wr, this, 10) + mark_length(_("Mark length"), _("Length of ruler marks"), "mark_length", &wr, this, 10), + scale(_("Scale"), _("Scale factor for ruler distance"), "scale", &wr, this, 1.0) { registerParameter(dynamic_cast<Parameter *>(&mark_distance)); registerParameter(dynamic_cast<Parameter *>(&mark_length)); + registerParameter(dynamic_cast<Parameter *>(&scale)); mark_distance.param_make_integer(); mark_length.param_make_integer(); @@ -51,7 +53,7 @@ LPERuler::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_i Point n(-rot90(dir) * mark_length); double length = L2(B - A); - g_print ("Distance: %8.2f\n", length); + g_print ("Distance: %8.2f\n", length * scale); Point C, D; for (int i = 0; i < length; i += static_cast<int>(mark_distance)) { |
