SVG: stroke-width and scale

Regina Henschel rb.henschel at t-online.de
Sun May 6 14:29:38 PDT 2012


Hi Christina,

Christina Roßmanith schrieb:
> Hi,
>
> what influence is anisotropic scaling supposed to have on stroke-width?
>
> Given a line
>
> <g transform="translate(60,-30) scale(8,2)">
> <path d="M 20 40 H 40" stroke-width="4" stroke="black" />
> </g>
>
> Currently stroke-width in this example get scaled to 8*4=32 which seems
> to be incorrect to me. If it gets scaled at all it should get the
> scaling perpendicular to the line direction, i.e. 2*4=8.
>
> Any thoughts?

Comment to the part "If it gets scaled at all": There exists the attribute
http://www.w3.org/TR/SVGTiny12/painting.html#NonScalingStroke
which is designed to prevent the width from scaling. So yes, the width 
has to be scaled.

It should look the same, as if you make a raster graphic from the 
unscaled drawing and then stretch the graphic with the given scale. At 
least that is the way it looks in the browsers Seamonkey and Opera.

Kind regards
Regina



More information about the LibreOffice mailing list