summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3c5c9d2)
raw | patch | inline | side by side (parent: 3c5c9d2)
author | cilix42 <cilix42@users.sourceforge.net> | |
Tue, 22 Jul 2008 12:41:32 +0000 (12:41 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Tue, 22 Jul 2008 12:41:32 +0000 (12:41 +0000) |
src/live_effects/lpe-ruler.cpp | patch | blob | history | |
src/live_effects/lpe-ruler.h | patch | blob | history |
index 89da4efe396d45de064320658ed537232f4cfa92..bd60966c885b095c3cf3c5b3fd4cf801d09c049e 100644 (file)
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();
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)) {
index 891217cc5431f4ff03f47a6fc2f8d27a8db09b39..044b93b49c2a77d7b841aac66211cf158e500495 100644 (file)
private:
ScalarParam mark_distance;
ScalarParam mark_length;
+ ScalarParam scale;
LPERuler(const LPERuler&);
LPERuler& operator=(const LPERuler&);
};