diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2014-12-25 11:40:35 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2014-12-25 11:40:35 +0000 |
| commit | 9a8bd0c8c29161a2fd91ccb48a3a813d4a45ac99 (patch) | |
| tree | ff76ccc40eff6789fba245ff1c8ee15d5b5303da /src/ui/tools/freehand-base.cpp | |
| parent | Remove sp_style_read_from_object() (diff) | |
| download | inkscape-9a8bd0c8c29161a2fd91ccb48a3a813d4a45ac99.tar.gz inkscape-9a8bd0c8c29161a2fd91ccb48a3a813d4a45ac99.zip | |
Remove sp_style_write_string() and sp_style_write_difference().
(bzr r13822.1.4)
Diffstat (limited to 'src/ui/tools/freehand-base.cpp')
| -rw-r--r-- | src/ui/tools/freehand-base.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp index c9fe37135..0f14d7534 100644 --- a/src/ui/tools/freehand-base.cpp +++ b/src/ui/tools/freehand-base.cpp @@ -247,11 +247,9 @@ static void spdc_apply_powerstroke_shape(const std::vector<Geom::Point> & points char const *style_str = NULL; style_str = repr->attribute("style"); if (style_str) { - SPStyle *style = sp_style_new(SP_ACTIVE_DOCUMENT); - sp_style_merge_from_style_string(style, style_str); - stroke_width = style->stroke_width.computed; - style->stroke_width.computed = 0; - sp_style_unref(style); + SPStyle style(SP_ACTIVE_DOCUMENT); + style.mergeString(style_str); + stroke_width = style.stroke_width.computed; } std::ostringstream s; @@ -821,14 +819,11 @@ void spdc_create_single_dot(ToolBase *ec, Geom::Point const &pt, char const *too // find out stroke width (TODO: is there an easier way??) double stroke_width = 3.0; - gchar const *style_str = NULL; - style_str = repr->attribute("style"); + gchar const *style_str = repr->attribute("style"); if (style_str) { - SPStyle *style = sp_style_new(SP_ACTIVE_DOCUMENT); - sp_style_merge_from_style_string(style, style_str); - stroke_width = style->stroke_width.computed; - style->stroke_width.computed = 0; - sp_style_unref(style); + SPStyle style(SP_ACTIVE_DOCUMENT); + style.mergeString(style_str); + stroke_width = style.stroke_width.computed; } // unset stroke and set fill color to former stroke color |
