summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/freehand-base.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-09-07 17:02:01 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-09-07 17:02:01 +0000
commit0d0958e3b2aff0ed5f3ad7a98b4035213475c7f1 (patch)
tree099d7926509e826b184def14a8e037e255fe36ab /src/ui/tools/freehand-base.cpp
parentFix gtk3 build (diff)
downloadinkscape-0d0958e3b2aff0ed5f3ad7a98b4035213475c7f1.tar.gz
inkscape-0d0958e3b2aff0ed5f3ad7a98b4035213475c7f1.zip
Update to experimental r13543
(bzr r13090.1.108)
Diffstat (limited to '')
-rw-r--r--src/ui/tools/freehand-base.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp
index 72250a550..bab6bc7e3 100644
--- a/src/ui/tools/freehand-base.cpp
+++ b/src/ui/tools/freehand-base.cpp
@@ -262,8 +262,9 @@ static void spdc_apply_powerstroke_shape(const std::vector<Geom::Point> & points
sp_style_unref(style);
}
- char * width_str = new char[50];
- sprintf(width_str, "0,%f", stroke_width / 2.);
+ std::ostringstream s;
+ s.imbue(std::locale::classic());
+ s << "0," << stroke_width / 2.;
// write powerstroke parameters:
lpe->getRepr()->setAttribute("start_linecap_type", "zerowidth");
@@ -272,9 +273,7 @@ static void spdc_apply_powerstroke_shape(const std::vector<Geom::Point> & points
lpe->getRepr()->setAttribute("sort_points", "true");
lpe->getRepr()->setAttribute("interpolator_type", "CubicBezierJohan");
lpe->getRepr()->setAttribute("interpolator_beta", "0.2");
- lpe->getRepr()->setAttribute("offset_points", width_str);
-
- delete [] width_str;
+ lpe->getRepr()->setAttribute("offset_points", s.str().c_str());
}
static void spdc_check_for_and_apply_waiting_LPE(FreehandBase *dc, SPItem *item, SPCurve *curve)