Hi Folks,
Inkscape and other SVG renderes draw shapes by drawing first the fill, and then drawing the border on top. As Ivan noted recently (in ""), at http://dev.w3.org/SVG/modules/vectoreffects/master/SVGVectorEffectsPrimer.ht... and http://www.w3.org/TR/SVGTiny12/render.html#PaintingShapesAndText , it is clear that the standard requests to do that.
I didn't know that, and took the time to render this svg: http://www.jvuletich.org/Morphic3/rects.svg like this: http://www.jvuletich.org/Morphic3/rectsInM3.png . It is a bit more complicated, but I feel it is better.
What do you think? Should I simplify my code and just draw one over the other? Or should the standard be changed, and Inkscape and other renderers do what I did?
Thanks, Juan Vuletich
That particular oddity has annoyed me a few times. I for one like your way much better, Juan. But I guess I'd be in favour of sticking with the standards if the standards people have no room for movement. Usually safest ;-)
There's a related oddity in Inkscape's rendering (and probably the standards), the fact that the border is drawn so that it overlaps the fill rather than surrounding it. To be honest, the idea of the stroke surrounding the fill (non-overlapping) makes a lot more intuitive sense to me, especially when you've got thick and/or translucent strokes like Juan's example.
Is somebody able to explain why the overlapping method is used, either for intuitive reasons or technical reasons? Or is it just an arbitrary choice by those who write the standards?
- Bryan
Why not take it to the SVG mailing list directly? (Note that I've taken the liberty to change the subject.) My guess would be that SVG does it for simplicity, but I'm definitely not sure.
Bryan Hoyt | Brush Technology wrote:
That particular oddity has annoyed me a few times. I for one like your way much better, Juan. But I guess I'd be in favour of sticking with the standards if the standards people have no room for movement. Usually safest ;-)
There's a related oddity in Inkscape's rendering (and probably the standards), the fact that the border is drawn so that it overlaps the fill rather than surrounding it. To be honest, the idea of the stroke surrounding the fill (non-overlapping) makes a lot more intuitive sense to me, especially when you've got thick and/or translucent strokes like Juan's example.
Is somebody able to explain why the overlapping method is used, either for intuitive reasons or technical reasons? Or is it just an arbitrary choice by those who write the standards?
- Bryan
-- PS. Check out the Brush newsletter: *Subscribe or read our previous newsletters* http://brush.co.nz/articles
Bryan Hoyt, /Web Development Manager/ -- Brush Technology *Ph:* +64 3 942 7833 *Mobile:* +64 21 238 7955 *Web:* brush.co.nz http://brush.co.nz/ On Sat, Jun 5, 2010 at 01:48, Juan Vuletich <juan@...2357... mailto:juan@...2357...> wrote:
Hi Folks, Inkscape and other SVG renderes draw shapes by drawing first the fill, and then drawing the border on top. As Ivan noted recently (in ""), at http://dev.w3.org/SVG/modules/vectoreffects/master/SVGVectorEffectsPrimer.html and http://www.w3.org/TR/SVGTiny12/render.html#PaintingShapesAndText , it is clear that the standard requests to do that. I didn't know that, and took the time to render this svg: http://www.jvuletich.org/Morphic3/rects.svg like this: http://www.jvuletich.org/Morphic3/rectsInM3.png . It is a bit more complicated, but I feel it is better. What do you think? Should I simplify my code and just draw one over the other? Or should the standard be changed, and Inkscape and other renderers do what I did? Thanks, Juan Vuletich
Jasper van de Gronde wrote:
Why not take it to the SVG mailing list directly? (Note that I've taken the liberty to change the subject.) My guess would be that SVG does it for simplicity, but I'm definitely not sure.
You're right. I'm a bit short of time on weekends, but will do it on Monday.
Cheers, Juan Vuletich
Bryan Hoyt | Brush Technology wrote:
That particular oddity has annoyed me a few times. I for one like your way much better, Juan. But I guess I'd be in favour of sticking with the standards if the standards people have no room for movement. Usually safest ;-)
There's a related oddity in Inkscape's rendering (and probably the standards), the fact that the border is drawn so that it overlaps the fill rather than surrounding it. To be honest, the idea of the stroke surrounding the fill (non-overlapping) makes a lot more intuitive sense to me, especially when you've got thick and/or translucent strokes like Juan's example.
Is somebody able to explain why the overlapping method is used, either for intuitive reasons or technical reasons? Or is it just an arbitrary choice by those who write the standards?
- Bryan
-- PS. Check out the Brush newsletter: *Subscribe or read our previous newsletters* http://brush.co.nz/articles
Bryan Hoyt, /Web Development Manager/ -- Brush Technology *Ph:* +64 3 942 7833 *Mobile:* +64 21 238 7955 *Web:* brush.co.nz http://brush.co.nz/ On Sat, Jun 5, 2010 at 01:48, Juan Vuletich <juan@...2357... mailto:juan@...2357...> wrote:
Hi Folks, Inkscape and other SVG renderes draw shapes by drawing first the
fill, and then drawing the border on top. As Ivan noted recently (in ""), at
http://dev.w3.org/SVG/modules/vectoreffects/master/SVGVectorEffectsPrimer.ht...
and
http://www.w3.org/TR/SVGTiny12/render.html#PaintingShapesAndText , it is clear that the standard requests to do that.
I didn't know that, and took the time to render this svg: http://www.jvuletich.org/Morphic3/rects.svg like this: http://www.jvuletich.org/Morphic3/rectsInM3.png . It is a bit more complicated, but I feel it is better. What do you think? Should I simplify my code and just draw one
over the other? Or should the standard be changed, and Inkscape and other renderers do what I did?
Thanks, Juan Vuletich
No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.819 / Virus Database: 271.1.1/2918 - Release Date: 06/04/10 15:25:00
Hi, Folks-
As I understand it, this treatment of stoke-over-fill and inner-and-outer stroke is a pretty standard convention. It's certainly the way that Adobe Illustrator handles stroke and fill, which is why (I believe) SVG does it that way. But when it comes down to it, it is an arbitrary decision... they had to specify one particular behavior.
That said, we recognize that content authors may wish to have some different options, which is why we are specifying Vector Effects... to allow fine-grained control over the appearance.
A couple more comments inline...
Jasper van de Gronde wrote (on 6/5/10 4:15 AM):
Why not take it to the SVG mailing list directly? (Note that I've taken the liberty to change the subject.) My guess would be that SVG does it for simplicity, but I'm definitely not sure.
Bryan Hoyt | Brush Technology wrote:
That particular oddity has annoyed me a few times. I for one like your way much better, Juan. But I guess I'd be in favour of sticking with the standards if the standards people have no room for movement. Usually safest ;-)
It is absolutely too late to change SVG to have different behavior here, even if everyone agreed that this should be the expected behavior. With the new options through Vector Effects, I think we can meet all the use cases. Authoring tools could then choose which behavior to have as a default, depending on what makes sense for the anticipated users.
There's a related oddity in Inkscape's rendering (and probably the standards), the fact that the border is drawn so that it overlaps the fill rather than surrounding it. To be honest, the idea of the stroke surrounding the fill (non-overlapping) makes a lot more intuitive sense to me, especially when you've got thick and/or translucent strokes like Juan's example.
There are ways in SVG 1.1 to get the different effects you're describing, based on combining properties. If you set the 'fill-opacity' and 'stroke-opacity' separately, they are composited together *after* the opacity is applied, but if you set them simultaneously with the 'opacity' property, they are composited together *before* the opacity is applied, so they will be treated as a single graphic primitive (i.e. there won't be any fill visible through the stroke). You can see this in the example file I threw together [1].
Is somebody able to explain why the overlapping method is used, either for intuitive reasons or technical reasons? Or is it just an arbitrary choice by those who write the standards?
As mentioned, it's an arbitrary (but logical) choice, based on pre-existing implementations of vector graphics.
Bryan Hoyt, /Web Development Manager/ -- Brush Technology *Ph:* +64 3 942 7833 *Mobile:* +64 21 238 7955 *Web:* brush.co.nz http://brush.co.nz/ On Sat, Jun 5, 2010 at 01:48, Juan Vuletich <juan@...2357... mailto:juan@...2357...> wrote:
Hi Folks,
Inkscape and other SVG renderes draw shapes by drawing first the fill, and then drawing the border on top. As Ivan noted recently (in ""), at http://dev.w3.org/SVG/modules/vectoreffects/master/SVGVectorEffectsPrimer.ht...
and http://www.w3.org/TR/SVGTiny12/render.html#PaintingShapesAndText , it is clear that the standard requests to do that.
I didn't know that, and took the time to render this svg: http://www.jvuletich.org/Morphic3/rects.svg like this: http://www.jvuletich.org/Morphic3/rectsInM3.png . It is a bit more complicated, but I feel it is better.
What do you think? Should I simplify my code and just draw one over the other? Or should the standard be changed, and Inkscape and other renderers do what I did?
I strongly suggest you not exhibit non-standard behavior. That's what standards are for... so content authors can rely on predictable behavior across implementations.
[1] http://schepers.cc/svg/opacity-tests.svg
Regards- -Doug Schepers W3C Team Contact, SVG and WebApps WGs
Doug Schepers wrote:
Hi, Folks-
As I understand it, this treatment of stoke-over-fill and inner-and-outer stroke is a pretty standard convention. It's certainly the way that Adobe Illustrator handles stroke and fill, which is why (I believe) SVG does it that way. But when it comes down to it, it is an arbitrary decision... they had to specify one particular behavior.
That said, we recognize that content authors may wish to have some different options, which is why we are specifying Vector Effects... to allow fine-grained control over the appearance.
A couple more comments inline...
Jasper van de Gronde wrote (on 6/5/10 4:15 AM):
Why not take it to the SVG mailing list directly? (Note that I've taken the liberty to change the subject.) My guess would be that SVG does it for simplicity, but I'm definitely not sure.
Bryan Hoyt | Brush Technology wrote:
That particular oddity has annoyed me a few times. I for one like your way much better, Juan. But I guess I'd be in favour of sticking with the standards if the standards people have no room for movement. Usually safest ;-)
It is absolutely too late to change SVG to have different behavior here, even if everyone agreed that this should be the expected behavior. With the new options through Vector Effects, I think we can meet all the use cases. Authoring tools could then choose which behavior to have as a default, depending on what makes sense for the anticipated users.
There's a related oddity in Inkscape's rendering (and probably the standards), the fact that the border is drawn so that it overlaps the fill rather than surrounding it. To be honest, the idea of the stroke surrounding the fill (non-overlapping) makes a lot more intuitive sense to me, especially when you've got thick and/or translucent strokes like Juan's example.
There are ways in SVG 1.1 to get the different effects you're describing, based on combining properties. If you set the 'fill-opacity' and 'stroke-opacity' separately, they are composited together *after* the opacity is applied, but if you set them simultaneously with the 'opacity' property, they are composited together *before* the opacity is applied, so they will be treated as a single graphic primitive (i.e. there won't be any fill visible through the stroke). You can see this in the example file I threw together [1].
Is somebody able to explain why the overlapping method is used, either for intuitive reasons or technical reasons? Or is it just an arbitrary choice by those who write the standards?
As mentioned, it's an arbitrary (but logical) choice, based on pre-existing implementations of vector graphics.
Bryan Hoyt, /Web Development Manager/ -- Brush Technology *Ph:* +64 3 942 7833 *Mobile:* +64 21 238 7955 *Web:* brush.co.nz http://brush.co.nz/ On Sat, Jun 5, 2010 at 01:48, Juan Vuletich <juan@...2357... mailto:juan@...2357...> wrote:
Hi Folks,
Inkscape and other SVG renderes draw shapes by drawing first the fill, and then drawing the border on top. As Ivan noted recently (in ""), at http://dev.w3.org/SVG/modules/vectoreffects/master/SVGVectorEffectsPrimer.ht...
and http://www.w3.org/TR/SVGTiny12/render.html#PaintingShapesAndText , it is clear that the standard requests to do that.
I didn't know that, and took the time to render this svg: http://www.jvuletich.org/Morphic3/rects.svg like this: http://www.jvuletich.org/Morphic3/rectsInM3.png . It is a bit more complicated, but I feel it is better.
What do you think? Should I simplify my code and just draw one over the other? Or should the standard be changed, and Inkscape and other renderers do what I did?
I strongly suggest you not exhibit non-standard behavior. That's what standards are for... so content authors can rely on predictable behavior across implementations.
[1] http://schepers.cc/svg/opacity-tests.svg
Regards- -Doug Schepers W3C Team Contact, SVG and WebApps WGs
Thank you very much for your comments.
Cheers, Juan Vuletich
Bryan Hoyt | Brush Technology wrote:
That particular oddity has annoyed me a few times. I for one like your way much better, Juan. But I guess I'd be in favour of sticking with the standards if the standards people have no room for movement. Usually safest ;-)
Thanks. Yes, I agree. Anyway I think the discussion makes sense.
There's a related oddity in Inkscape's rendering (and probably the standards), the fact that the border is drawn so that it overlaps the fill rather than surrounding it. To be honest, the idea of the stroke surrounding the fill (non-overlapping) makes a lot more intuitive sense to me, especially when you've got thick and/or translucent strokes like Juan's example.
So you mean that (for example) in a rectangle with width 20 and height 10, and stroke-width 10, then the fill should be 20x10, and the fill + border should be 40x30? I believe that saying that the shape specifies the center of the nib of the pen used to draw the stroke is intuitive and makes sense. To me the current resulting sizes are ok. The only thing that I don't like is the effect with translucent stroke.
Is somebody able to explain why the overlapping method is used, either for intuitive reasons or technical reasons? Or is it just an arbitrary choice by those who write the standards?
- Bryan
Well, I tried :) Cheers, Juan Vuletich
-- PS. Check out the Brush newsletter: *Subscribe or read our previous newsletters* http://brush.co.nz/articles
Bryan Hoyt, /Web Development Manager/ -- Brush Technology *Ph:* +64 3 942 7833 *Mobile:* +64 21 238 7955 *Web:* brush.co.nz http://brush.co.nz/ On Sat, Jun 5, 2010 at 01:48, Juan Vuletich <juan@...2357... mailto:juan@...2357...> wrote:
Hi Folks, Inkscape and other SVG renderes draw shapes by drawing first the fill, and then drawing the border on top. As Ivan noted recently (in ""), at http://dev.w3.org/SVG/modules/vectoreffects/master/SVGVectorEffectsPrimer.html and http://www.w3.org/TR/SVGTiny12/render.html#PaintingShapesAndText , it is clear that the standard requests to do that. I didn't know that, and took the time to render this svg: http://www.jvuletich.org/Morphic3/rects.svg like this: http://www.jvuletich.org/Morphic3/rectsInM3.png . It is a bit more complicated, but I feel it is better. What do you think? Should I simplify my code and just draw one over the other? Or should the standard be changed, and Inkscape and other renderers do what I did? Thanks, Juan Vuletich ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net <mailto:Inkscape-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/inkscape-devel
No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.819 / Virus Database: 271.1.1/2918 - Release Date: 06/04/10 15:25:00
There's a related oddity in Inkscape's rendering (and probably the
standards), the fact that the border is drawn so that it overlaps the fill rather than surrounding it. To be honest, the idea of the stroke surrounding the fill (non-overlapping) makes a lot more intuitive sense to me, especially when you've got thick and/or translucent strokes like Juan's example.
So you mean that (for example) in a rectangle with width 20 and height 10, and stroke-width 10, then the fill should be 20x10, and the fill + border should be 40x30? I believe that saying that the shape specifies the center of the nib of the pen used to draw the stroke is intuitive and makes sense. To me the current resulting sizes are ok. The only thing that I don't like is the effect with translucent stroke.
Ah, that actually answers my question perfectly -- because all strokes are centered on their nodes. Thanks.
- Bryan
participants (4)
-
Bryan Hoyt | Brush Technology
-
Doug Schepers
-
Jasper van de Gronde
-
Juan Vuletich