Re: Thoughts about variable-width strokes in SVG2

On Mon, May 6, 2013 at 10:15 PM, Brian Birtles <bbirtles@mozilla.com> wrote:

> Hi Rik,
>
> Thanks for your feedback here.
>
>
> (2013/05/07 13:00), Rik Cabanier wrote:
>
>>     Regarding question 1 (how to position the widths), option (A) is
>>     problematic. Every time you add a point to the <polyline> you would
>>     have to adjust all the other stroke width offsets since they are
>>     based on a percentage of the path length and the path length has
>>     changed. That's clumsy and slow (and speed really matters for this
>>     app on mobile).
>>
>>
>> How common would that be?
>> Even so, you have to stroke again if you add a point so the calculation
>> needs to be redone anyway.
>>
>
> I guess I didn't explain the use case very well. You add a point to the
> <polyline> on every single pointer event, i.e. several times a second.
>

How common is that?


>
> I'm focussing on the useability from an *authoring* point of view, not an
> *implementation* point of view.
>
> From an authoring point of view, using approach (A), in script you have to
> recalculate *all* the offsets on *every* pointer event.
>

Calculating an offset is easy and fast. The calculation of the variable
width will be hundreds of times slower.


>
> Using approach (C) you don't need to calculate anything.
>

 That's not how variable width strokes are used though. I was under the
impression that they are most commonly used to imitate brush strokes.
You also have to think about how they work. Adding points to a stroke
shouldn't affect the 'curve' of the variable width.

One question is how we define the curve. At the Sydney F2F we discussed
catmull rom but it's possible that another curve is better.

Received on Tuesday, 7 May 2013 05:24:35 UTC