From 850515e890b2bebbac5dcde3b04d3fc0cff52654 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Sun, 10 Jun 2018 22:20:18 +0200 Subject: Revert changes --- src/display/nr-style.cpp | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'src/display/nr-style.cpp') diff --git a/src/display/nr-style.cpp b/src/display/nr-style.cpp index 564a6209b..cec6de4d3 100644 --- a/src/display/nr-style.cpp +++ b/src/display/nr-style.cpp @@ -11,9 +11,6 @@ #include "display/nr-style.h" #include "style.h" -#include "util/units.h" -#include "inkscape.h" -#include "object/sp-namedview.h" #include "object/sp-paint-server.h" #include "display/canvas-bpath.h" // contains SPStrokeJoinType, SPStrokeCapType etc. (WTF!) #include "display/drawing-context.h" @@ -221,29 +218,10 @@ void NRStyle::set(SPStyle *style, SPStyle *context_style) n_dash = style->stroke_dasharray.values.size(); if (n_dash != 0) { - SPDocument * document = SP_ACTIVE_DOCUMENT; - SPNamedView *nv = sp_document_namedview(document, NULL); - Glib::ustring display_unit = "px"; - if (nv) { - display_unit = nv->display_units->abbr; - } - Geom::Rect vbox = document->getViewBox(); - if (style->stroke_dashoffset.unit == SVGLength::NONE) { - dash_offset = style->stroke_dashoffset.value; - } else if (style->stroke_dashoffset.unit == SVGLength::PERCENT) { - dash_offset = vbox.width() * style->stroke_dashoffset.value; - } else { - dash_offset = Inkscape::Util::Quantity::convert(style->stroke_dashoffset.computed, "px", display_unit.c_str()); - } + dash_offset = style->stroke_dashoffset.value; dash = new double[n_dash]; for (unsigned int i = 0; i < n_dash; ++i) { - if (style->stroke_dasharray.values[i].unit == SVGLength::NONE) { - dash[i] = style->stroke_dasharray.values[i].value; - } else if (style->stroke_dasharray.values[i].unit == SVGLength::PERCENT) { - dash[i] = vbox.width() * style->stroke_dasharray.values[i].value; - } else { - dash[i] = Inkscape::Util::Quantity::convert(style->stroke_dasharray.values[i].computed, "px", display_unit.c_str()); - } + dash[i] = style->stroke_dasharray.values[i]; } } else { dash_offset = 0.0; -- cgit v1.2.3