diff options
| author | Michael Soegtrop <MSoegtrop@yahoo.de> | 2016-06-12 10:52:33 +0000 |
|---|---|---|
| committer | Michael Soegtrop <MSoegtrop@yahoo.de> | 2016-06-12 10:52:33 +0000 |
| commit | 013ba80c5b0115dbb0f6da01e1f42806a4037eb8 (patch) | |
| tree | fe8d764a8e808c2084df8ace149d472109f3ae25 /src/extension/plugins/grid2/grid.cpp | |
| parent | Fixed Bool LPE review issues (diff) | |
| parent | Optionally sort attributes and properties into a canonical order. (diff) | |
| download | inkscape-013ba80c5b0115dbb0f6da01e1f42806a4037eb8.tar.gz inkscape-013ba80c5b0115dbb0f6da01e1f42806a4037eb8.zip | |
updated to latest trunk
(bzr r14876.2.3)
Diffstat (limited to 'src/extension/plugins/grid2/grid.cpp')
| -rw-r--r-- | src/extension/plugins/grid2/grid.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/extension/plugins/grid2/grid.cpp b/src/extension/plugins/grid2/grid.cpp index 3a2ed7867..6880c574d 100644 --- a/src/extension/plugins/grid2/grid.cpp +++ b/src/extension/plugins/grid2/grid.cpp @@ -114,7 +114,8 @@ Grid::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *doc bounding_area = temprec; } - gdouble scale = Inkscape::Util::Quantity::convert(1, "px", &document->doc()->getSVGUnit()); + double scale = document->doc()->getDocumentScale().inverse()[Geom::X]; + bounding_area *= Geom::Scale(scale); Geom::Point spacings( scale * module->get_param_float("xspacing"), scale * module->get_param_float("yspacing") ); @@ -133,15 +134,9 @@ Grid::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *doc path->setAttribute("d", path_data.c_str()); - Glib::ustring style("fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"); - style += ";stroke-width:"; - gchar floatstring[64]; std::ostringstream stringstream; - stringstream << line_width; - sprintf(floatstring, "%s", stringstream.str().c_str()); - style += floatstring; - style += "pt"; - path->setAttribute("style", style.c_str()); + stringstream << "fill:none;stroke:#000000;stroke-width:" << line_width << "px"; + path->setAttribute("style", stringstream.str().c_str()); current_layer->appendChild(path); Inkscape::GC::release(path); |
