On Sat, 2015-07-04 at 19:55 +0200, m .h. van der velde wrote:
Hi Judah, et al,
Thanks for your help and the screenshots. it’s very interesting, i never made the connection in my mind between the ‘custom size’ in the properties window and the viewbox-attribute in SVG, neither between the ‘scale strokes’ button in the Inkscape UI and the effect from SVG definition.
But, toggling the ‘transform strokes’ button doesn’t do anything.
I suddenly wonder,… I define the line style in a stylesheet in the head of document. Might it be that Inkscape doesn’t like that?
Also, this is my SVG definition:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="30cm" height="60cm" viewBox="0 0 30 60" > and Inkscape’s document setting
And the style, together with the first path. <![CDATA[
.cut{ stroke: #ff0000; stroke-width: 1px; fill: none; } .fold{ stroke: #08C; stroke-width: 1px; fill: none; stroke-dasharray:2, 2 } .valley{ stroke: #00cccc; stroke-width: 1px; fill: none; stroke-dasharray:3, 2 } .mountain{ stroke: teal; stroke-width: 1px; fill: none; stroke-dasharray:2, 3 } .construction{ stroke: silver; stroke-width: 1px; fill: none; stroke-dasharray:10,3 } ]]> </style> <path id="outside" class="cut" vector-effect="non-scaling-stroke" d="M 0 0
Thanks for your help, I suspect it’s a bug in my SVG, rather then a bug in Inkscape.
The combination of the 'width'/'height' and 'viewBox' define the initial "user unit" in SVG which is equivalent to '1 cm' in "real world" units according to the information in the <svg> element. I won't go into the long, twisted history of SVG and CSS but internally "px" is defined to be mean one "user unit". Thus, your <style> element is defining the stroke widths to be 1 cm wide in "real world" units.
The 'vector-effects' property was added in the SVG 2 specification (which is yet to be finished). It is not yet supported in Inkscape.
Tav