From dac72fcd64d2fb7e216d5165a8821b722d2eded9 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 15 Aug 2018 11:11:55 +0200 Subject: Relative values for strokes: Fix segmenation fault on reading dashes with % values. Fix computed value for dashes with % values (use viewport diagonal length). Support % values for stroke width. --- src/object/sp-item.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/object/sp-item.cpp') diff --git a/src/object/sp-item.cpp b/src/object/sp-item.cpp index 3b6329436..d7c461f92 100644 --- a/src/object/sp-item.cpp +++ b/src/object/sp-item.cpp @@ -1307,10 +1307,11 @@ void SPItem::adjust_stroke( gdouble ex ) if ( !style->stroke_dasharray.values.empty() ) { for (unsigned i = 0; i < style->stroke_dasharray.values.size(); i++) { - double dash = style->stroke_dasharray.values[i].value * ex; - style->stroke_dasharray.values[i].setDouble(dash); + style->stroke_dasharray.values[i].value *= ex; + style->stroke_dasharray.values[i].computed *= ex; } - style->stroke_dashoffset.value *= ex; + style->stroke_dashoffset.value *= ex; + style->stroke_dashoffset.computed *= ex; } updateRepr(); -- cgit v1.2.3