W3C home > Mailing lists > Public > www-svg@w3.org > September 2011

Re: Feature request for SVG2 : stroke-position

From: Jeremie Patonnier <jeremie.patonnier@gmail.com>
Date: Mon, 19 Sep 2011 23:16:53 +0200
Message-ID: <CAEi838mVmQw0_--KnYs44UB7bQF_FqMdFVSf7vRsOuB3-weQwA@mail.gmail.com>
To: "Dr. Olaf Hoffmann" <Dr.O.Hoffmann@gmx.de>
Cc: www-svg@w3.org
2011/9/19 Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>

> Hello,
> obviously this would be much simpler than to reuse elements or entities
> of path fragments with clipping or masking as currently or using the vector
> effect draft for this (as far as I understand it, it could cover this as
> well, but not simpler than clipping or masking:
> http://dev.w3.org/SVG/modules/vectoreffects/master/SVGVectorEffectsPrimer.html
> http://dev.w3.org/SVG/modules/vectoreffects/master/SVGVectorEffects.html

Yes, Vector effects are great but are much harder to use to achieve simple
stroke manipulation.

> But it is maybe a better (?) alternative to display only a fraction of
> the stroke using for example something like stroke-fraction="0.3,0.1",
> default would be stroke-fraction="0.5,0.5"?
> This would indicate, which part perpendicular to the path direction
> is intended to be displayed, for example the first parameter for
> the fraction outside of fill or if there is no fill and second within/above
> fill.

Yes, this is a powerfull tool, but in some way having two values to
manipulate is harder for (dumb) authors than one.
Discussion around how things work with two values can be extremely difficult
(as a little sample : What happen with stroke-fraction="0.3,0.1", where the
0.6 missing part goes ? Is it truncated ? Is it balanced ?)
Having a single value that move the rendering points sounds easier to
understand for authors (but not necessary easier to implement)

> Another problem of stroke-position may occur, if the proposal is realised,
> that stroke can have differents widths along a path.

I'm not sure it's a big issue (but I'm not an implementor). The larger part
of the stroke give the distance between the path points and the stroke
rendering points. But I agree that it will become trickier if we have to
deal with an animated stroke width, or worst if we filled a stroke with an
animated pattern. But I would love to see those discussion happen :-D

> Another alternative could be to combine this with the idea of
> a stroke with different widths, than stroke-fraction would be a
> longer list or better two attributes, each one list, one above fill,
> one outside. And there will be a need for stroke-keys and stroke-splines
> to get the shape of the stroke similar to keyTimes and keySplines for
> animation.

Maybe but in such a situation, this feature will become to complex for
author that will fallback on simpler tools such as... let's say Vector
Effects ? ;)

The purpose of my proposal is to provide simple tools for authors (in that
case to simply act on stroke). At some points, it's very hard to produce SVG
by hand and I think SVG needs more simple tools (even if they are limited)
thought for authors (in addition of amazing power tools thought for editors
of course).

Web : http://jeremie.patonnier.net
Twitter : @JeremiePat <http://twitter.com/JeremiePat>
Received on Monday, 19 September 2011 21:17:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:32 UTC