summaryrefslogtreecommitdiffstats
path: root/src/marker.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2008-02-13 19:16:50 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2008-02-13 19:16:50 +0000
commit500b038612542ea9f50ff4515923023675b4d7bd (patch)
treeed8f597a6a090ff9c803e26f10d7eb28817c1672 /src/marker.cpp
parentmore consistent names (diff)
downloadinkscape-500b038612542ea9f50ff4515923023675b4d7bd.tar.gz
inkscape-500b038612542ea9f50ff4515923023675b4d7bd.zip
fix scaling with stroke width for user-created markers
(bzr r4724)
Diffstat (limited to 'src/marker.cpp')
-rw-r--r--src/marker.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/marker.cpp b/src/marker.cpp
index 0050fc87c..08f1b5fad 100644
--- a/src/marker.cpp
+++ b/src/marker.cpp
@@ -724,13 +724,17 @@ generate_marker (GSList *reprs, NR::Rect bounds, SPDocument *document, NR::Matri
Inkscape::XML::Node *defsrepr = SP_OBJECT_REPR (SP_DOCUMENT_DEFS (document));
Inkscape::XML::Node *repr = xml_doc->createElement("svg:marker");
- repr->setAttribute("markerUnits", "userSpaceOnUse");
+
+ // Uncommenting this will make the marker fixed-size independent of stroke width.
+ // Commented out for consistency with standard markers which scale when you change
+ // stroke width:
+ //repr->setAttribute("markerUnits", "userSpaceOnUse");
+
sp_repr_set_svg_double(repr, "markerWidth", bounds.extent(NR::X));
sp_repr_set_svg_double(repr, "markerHeight", bounds.extent(NR::Y));
repr->setAttribute("orient", "auto");
-
defsrepr->appendChild(repr);
const gchar *mark_id = repr->attribute("id");
SPObject *mark_object = document->getObjectById(mark_id);