On 05/10/2013 06:49 PM, mathog wrote:
It strikes me that no matter how these questions are finally resolved the resulting construct is not likely to be very compatible with other graphics formats. There may be some graphics format that has a similar construct, but in the vast majority of cases the only way the resulting graphic could be represented is as a filled closed path. The questions above, where the answers in most instances are a matter of taste, suggest that it might be better to leave this feature out of SVG entirely and let programs which want to implement a varying width stroke do so with a filter or tool that converts from the initial fixed width stroke along a path to a filled object corresponding to the varying width stroke along the same path - the resulting object being just a normal collection of Bezier and linear segments. Among other advantages, the conversion which generates the new object only needs to be done once, rather than every time the object is moved on the screen, which would be the case if SVG supported this type (assuming it was handled like glyphs and other draw items are now, by the routines in src/display). Similarly, selection (by mouse) is already in place for the converted object, but looks as if it would be pretty messy for the varying width stroke object.
If you convert a stroke with varying width to a path describing its outline right away you will not be able to edit the original stroke afterwards (but just the outline) because the inverse operation - guessing the variable width stroke from a path describing its outline - is between messy and impossible.
Storing both the outline and the original stroke is redundant.
The main application of variable width strokes are artistic drawings where you want to be able to edit the stroke in all its properties at any time.
I would guess that the computational load of the stroke calculation is neg- legible, especially when you place the support points of the outline at nodes. If there is any problem with that, a renderer could just cache the stroke outline.
Regards, Sebastian Götte