summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-path_length.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-07-31 17:13:05 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-07-31 17:13:05 +0000
commit4f80abc6e87ae2783be04e3f8ee5e63ccea0a7dd (patch)
tree272f130730fa7c5d8473b6a7638515c263073aa4 /src/live_effects/lpe-path_length.cpp
parentAdd unit selector for lpe-path-length, too (diff)
downloadinkscape-4f80abc6e87ae2783be04e3f8ee5e63ccea0a7dd.tar.gz
inkscape-4f80abc6e87ae2783be04e3f8ee5e63ccea0a7dd.zip
Make lpe-path_length use TextParamInternal
(bzr r6490)
Diffstat (limited to 'src/live_effects/lpe-path_length.cpp')
-rw-r--r--src/live_effects/lpe-path_length.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/live_effects/lpe-path_length.cpp b/src/live_effects/lpe-path_length.cpp
index 7ff154412..3b9b07c82 100644
--- a/src/live_effects/lpe-path_length.cpp
+++ b/src/live_effects/lpe-path_length.cpp
@@ -22,7 +22,7 @@ namespace LivePathEffect {
LPEPathLength::LPEPathLength(LivePathEffectObject *lpeobject) :
Effect(lpeobject),
- info_text(_("Info text"), _("Parameter for text creation"), "info_text", &wr, this, ""),
+ info_text(this),
unit(_("Unit"), _("Unit"), "unit", &wr, this)
{
registerParameter(dynamic_cast<Parameter *>(&info_text));
@@ -44,7 +44,7 @@ LPEPathLength::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
gboolean success = sp_convert_distance(&lengthval, &sp_unit_get_by_id(SP_UNIT_PX), unit);
/* ... set it as the canvas text ... */
- gchar *arc_length = g_strdup_printf("%8.2f %s", lengthval, success ? unit.get_abbreviation() : "px");
+ gchar *arc_length = g_strdup_printf("%.2f %s", lengthval, success ? unit.get_abbreviation() : "px");
info_text.param_setValue(arc_length);
g_free(arc_length);
@@ -56,7 +56,7 @@ LPEPathLength::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
Point c;
double area;
if (centroid(pwd2_in, c, area)) {
- g_print ("Area is zero\n");
+ //g_print ("Area is zero\n");
}
//g_print ("Area: %f\n", area);