summaryrefslogtreecommitdiffstats
path: root/src/object
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-06-10 14:20:18 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-08-05 00:31:06 +0000
commit7aaeaacc08de60fd324646afe69f4dbed93f89d4 (patch)
tree13c87e946659151021e553dc3b752c3dbcd2f4a2 /src/object
parentFix one symbolic icon bug (diff)
downloadinkscape-7aaeaacc08de60fd324646afe69f4dbed93f89d4.tar.gz
inkscape-7aaeaacc08de60fd324646afe69f4dbed93f89d4.zip
Allow inkscape handle units and percent in dasharray and dashoffset. Add pref optional to scale dashes on stroke scale
Diffstat (limited to 'src/object')
-rw-r--r--src/object/sp-item.cpp5
-rw-r--r--src/object/sp-item.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/object/sp-item.cpp b/src/object/sp-item.cpp
index ec92c655f..fd27a6e90 100644
--- a/src/object/sp-item.cpp
+++ b/src/object/sp-item.cpp
@@ -1307,9 +1307,10 @@ void SPItem::adjust_stroke( gdouble ex )
if ( !style->stroke_dasharray.values.empty() ) {
for (unsigned i = 0; i < style->stroke_dasharray.values.size(); i++) {
- style->stroke_dasharray.values[i] *= ex;
+ style->stroke_dasharray.values[i].scale(ex);
}
- style->stroke_dashoffset.value *= ex;
+ style->stroke_dashoffset.value = style->stroke_dashoffset.value * ex;
+ style->stroke_dashoffset.computed = style->stroke_dashoffset.computed * ex;
}
updateRepr();
diff --git a/src/object/sp-item.h b/src/object/sp-item.h
index f6a6781e9..9651f9f26 100644
--- a/src/object/sp-item.h
+++ b/src/object/sp-item.h
@@ -395,7 +395,7 @@ public:
virtual Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type) const;
virtual void print(SPPrintContext *ctx);
- virtual const char* displayName() const;
+ virtual const char* displayName() const;
virtual char* description() const;
virtual Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags);
virtual void hide(unsigned int key);