summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5b29ec0)
raw | patch | inline | side by side (parent: 5b29ec0)
author | cilix42 <cilix42@users.sourceforge.net> | |
Thu, 31 Jul 2008 17:13:05 +0000 (17:13 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Thu, 31 Jul 2008 17:13:05 +0000 (17:13 +0000) |
src/live_effects/lpe-path_length.cpp | patch | blob | history | |
src/live_effects/lpe-path_length.h | patch | blob | history | |
src/live_effects/lpe-ruler.cpp | patch | blob | history |
index 7ff154412d5e5d9f8f28975a8c34a3407c2619e6..3b9b07c82a1ab81d820a042766917b16530c6db7 100644 (file)
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));
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);
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);
index 63f5ad39769120ed8ad9f69bd578cd62762b9280..1ec5165e95c40c1cd1a4445d4de8012c661544d5 100644 (file)
private:
LPEPathLength(const LPEPathLength&);
LPEPathLength& operator=(const LPEPathLength&);
- TextParam info_text;
+ TextParamInternal info_text;
UnitParam unit;
};
index f60c7b9fa2bb6ceb846ad42e02cad65abf58fbba..6711fe3f06b91bbbd2023e50b455acd2d88cf9f4 100644 (file)
gboolean success = sp_convert_distance(&lengthval, &sp_unit_get_by_id(SP_UNIT_PX), unit);
/* ... set it as the canvas text ... */
- gchar *dist = g_strdup_printf("%8.2f %s", lengthval, success ? unit.get_abbreviation() : "px");
+ gchar *dist = g_strdup_printf("%.2f %s", lengthval, success ? unit.get_abbreviation() : "px");
info_text.param_setValue(dist);
g_free(dist);