Hello
Here is a simple question about SVG.
Let's assume I have a circle which has a thick stroke. Then I put it in a group which has a transform attribute that specifies 0.5x scale in the horizontal direction. When the drawing is rendered, should the stroke of the circle be thinner on the sides or have an uniform width?
Regards, Krzysztof
On 20/6/10 00:27, Krzysztof Kosiński wrote:
Here is a simple question about SVG.
Let's assume I have a circle which has a thick stroke. Then I put it in a group which has a transform attribute that specifies 0.5x scale in the horizontal direction. When the drawing is rendered, should the stroke of the circle be thinner on the sides or have an uniform width?
related: Bug #165715 “Stroke to path squashes scaled lines (renderer is wrong)”: https://bugs.launchpad.net/inkscape/+bug/165715
~suv
W dniu 20 czerwca 2010 00:42 użytkownik ~suv <suv-sf@...58...> napisał:
On 20/6/10 00:27, Krzysztof Kosiński wrote:
Here is a simple question about SVG.
Let's assume I have a circle which has a thick stroke. Then I put it in a group which has a transform attribute that specifies 0.5x scale in the horizontal direction. When the drawing is rendered, should the stroke of the circle be thinner on the sides or have an uniform width?
related: Bug #165715 “Stroke to path squashes scaled lines (renderer is wrong)”: https://bugs.launchpad.net/inkscape/+bug/165715
FWIW, correcting this bug in Cairo output is very simple. We just apply the transformation to the Cairo context, instead of transforming the path.
Regards, Krzysztof
On Sun, Jun 20, 2010 at 12:27:52AM +0200, Krzysztof Kosiński wrote:
Here is a simple question about SVG.
Let's assume I have a circle which has a thick stroke. Then I put it in a group which has a transform attribute that specifies 0.5x scale in the horizontal direction. When the drawing is rendered, should the stroke of the circle be thinner on the sides or have an uniform width?
For better or worse, the spec says it should be thinner [in terms of its appearance in a png, as distinct from its width in its local coordinate system]: see
http://www.w3.org/TR/SVG11/coords.html#ExampleRotateScale
or
http://www.w3.org/TR/SVG11/coords.html#ExampleUnits
pjrm.
On Tuesday, June 22, 2010, 10:11:36 AM, Peter wrote:
PM> On Sun, Jun 20, 2010 at 12:27:52AM +0200, Krzysztof Kosiński wrote:
Here is a simple question about SVG.
Let's assume I have a circle which has a thick stroke. Then I put it in a group which has a transform attribute that specifies 0.5x scale in the horizontal direction. When the drawing is rendered, should the stroke of the circle be thinner on the sides or have an uniform width?
PM> For better or worse, the spec says it should be thinner PM> [in terms of its appearance in a png, as distinct from its width in its PM> local coordinate system]
Yes. In SVG 1.1, all geometry is specified in the local coordinate system; this includes stroke width and markers. So transformations will apply to stroke.
In SVG Tiny 1.2 we introduced trandformRef, so that for example a stroke could be defined relative to the transformation on another element (typically a more root-wards one). This gives a non-scaling stroke.
http://www.w3.org/TR/2008/REC-SVGTiny12-20081222/coords.html#transform-ref
I would expect the same or an enhanced version of this feature in SVG 2.0.
participants (4)
-
Chris Lilley
-
Krzysztof Kosiński
-
Peter Moulder
-
~suv