Hi Johan and others,
The SVG Working Group discussed variable width strokes last night. A number of questions came about how it should be implemented in SVG. As we have this implemented via the Power Stroke (PS) LPE it would be interesting to get some feedback from Johan and others about these topics:
1. How should the position of the points where the widths are defined be described along the path?
PS uses a real number where the integer part gives the node (numbered from the start of the path) and the fractional part the fractional distance between that node and the next node.
The WG seems to favor defining the position using a property via the distance along the path defined either as a percentage of the total length or in absolute units. The argument is that then the same property could be assigned using CSS to multiple paths (e.g. a large number of lines that represent hair). On the other hand, having node based positioning would allow a use as shown in:
https://people.mozilla.com/~bbirtles/variable-width-stroke/variable-width-st...
2. How should the widths be defined?
PS uses absolute user units. The WG seems to favor using a percentage of the stroke width. This would allow quick adjustment of the whole path thickness.
3. Should the widths be symmetric or asymmetric about the path?
PS uses symmetric widths. The WG wants to eventually allow asymmetric strokes but maybe not at the time.
4. Should negative numbers be allowed?
PS allows negative numbers. The WG seems to favor allowing negative strokes if asymmetric strokes are allowed.
5. How should smoothing be done?
PS provides four different algorithms. The WG seems to favor for the moment one smoothing algorithm (Catmull-Rom?) with maybe a linear smoothing. There was some discussion of allowing the algorithm to change along the path.
6. Questions about end-cap and line-join:
PS has discontinuities with the various end-caps. Illustrator has continuous edges (at least with round end-caps).
Tav
Discussion on www-svg:
http://lists.w3.org/Archives/Public/www-svg/2013May/0002.html
Minutes of last nights meeting: http://www.w3.org/2013/05/09-svg-minutes.html
Illustrator end-caps: http://lists.w3.org/Archives/Public/public-svg-wg/2013AprJun/0101.html