Re: Feature request for SVG2 : stroke-position

Am 02.10.2011 um 18:18 schrieb Dr. Olaf Hoffmann:

> Dirk Schulze:
>> I like the idea of stroke-position. I believe it covers most needs of web
>> developers, it is easy to implement and doesn't cause multiple DOM calls
>> like vector-effect does.
>> 
>> stroke-fraction is maybe a bit to complicated in my eyes. How does it work
>> together with stroke-width? If it takes stroke width into account, what if
>> the width doesn't reach the outermost border defined by stroke-fraction?
>> This would have a better place in vector-effects.
>> 
> You can see it in the examples, generally it is the same effect as if you
> cover/clip parts of the stroke with another stroke of the same path with
> another width. Because it is only a fraction of the stroke-width, the 
> remaining part will be always within the width. If you need a larger offset,
> you have to increase the stroke-width.
I have no doubt that implementing stroke-fraction is as complicated/easy as stroke-position. But I could imagine that the combination of stroke-width and stroke-position may fit the interests of developers more:

stroke-width="5" stroke-position="inside"

Of course that is just my subjective meaning. And of course you can do that with stroke-fraction as well. In some cases stroke-fraction might be easier to use (btw I'd ignore stroke-width if stroke-fration was defined).

> 
> If you think stroke-position differs in what one can finally see, 
> I think, it would be a good idea to have a proposal with a precise 
> definition of stroke-position for arbitrary path segments (especially cubic)
> and the combination with other stroke properties. Then we can see, 
> whether it really differs from a stroke-fraction (of a stroke-fraction with 
> a larger stroke-width) or not.

To be honest, I don't have strong arguments against stroke-fraction. I just think that stroke-position might be more intuitionally. And both attributes would need a definition how to interact with other stroke properties/attributes.

> 
> Because the idea of stroke-fraction I can realise already today with clipping
> and masking, I think, it is simple to implement. If the appearence of 
> stroke-position differs significantly from a stroke of SVG 1.1 with some
> width and parts of the width is clipped, this would be really something new
> to implement, no simplified notation of a known effect.
> Therefore (decaratively animated) example simulations with loops, open paths,
> subpaths, degenerate paths with no inside additionally to a precise definition 
> will be interesting as well to see how this stroke-position really behaves in 
> non trivial situations. 
> This can help to avoid, that critical situations are not
> defined at all - what we already have for stroke-dasharray.
> 
I totally agree! But we would have to do it anyway for both attributes. If the working group decides to support one of the both attributes (independent which one) I'd implement it. I think it is a great idea! At the end both attributes have the same target.


To stroke-overlap. The following stroke might be easier to implement with composite operators:



Dirk

Received on Sunday, 2 October 2011 17:41:06 UTC