Feedback on variable stroke-width.

Hi,

This is a summary of questions and comments from the Inkscape
developer's mailing list and a few other places. Some of these comments
overlap with the discussions on the "Straw man" stroke-width syntax.
Overall there is great enthusiasm for variable stroke widths!


Questions:

  * Will there be a proper fallback: a specific feature name usable in
svg:switch?

  * How will variable stroke-widths interact with vector effects?

    (Could it actually be implemented as a vector effect so that if
problems are found a new vector effect could be created without
invalidating the original one?)

  * How will stroke position work with this? (There is high demand for
adjustable stroke positioning. If we have asymmetric widths you can be
sure it will be used to simulate this. Maybe we should just bite the
bullet spec stroke position now.)

  * How are dashes handled (e.g. dash caps)?

  * Can other properties depend on path position, e.g. color?

  * How will line joins be handled with repeated patterns where the
beginning and ending widths are different and the path segments are at
an angle?

Comments:

  * Inkscape's Power Stroke implementation:

    I was slightly wrong about how Inkscape determines the position
along a path. The fractional part is actually the 'time value' of the
Bezier curve as was easier to use that the actual distance. Thus:

    unit part -> node index
    fractional part -> 'time value'

 * Mixing linear and smooth parts:

    Could be done by adding a smoothness type for each point. Inkscape's
Spiro LPE uses the following notation:

    c 0, 10px --> curved
    c 1, 20px
    ] 2, 10px --> left of node curved, linear on right
    s 2.5, 15px --> linear
    [ 3, 10px --> right of node curved, linear on left
    c 4, 20px
    c 5, 10px

    Synfig uses a smoothness value the interpolates between a smoothed
curve and a straight line.


 * Positioning using percentage is more computationally intensive if
only part of path shown.


Other implementations of variable stroke width:

 * Synfig:

  http://wiki.synfig.org/wiki/Advanced_Outline_Layer

  Positioning along length either

   Homogeneous: based on percentage of length.

   Non Homogeneous: based on percentage of points (a three Bezier path
has four points so 0.5 means middle of second Bezier).

  Width is percentage of nominal stroke width, negative values allowed.

  Smoothing done by 5th degree spline smooth function in linear
combination with linear interpolation. A smoothness parameter allows
change between smooth and linear. See:

https://github.com/synfig/synfig/blob/master/synfig-core/src/synfig/valuenode_wplist.cpp#L107

  End caps are discontinuous when smoothness is zero and continuous when
smoothness is maximum.

  With dashed lines, allows custom caps and a variable width within
dash.

  Not yet in Wiki: Complex method to keep width control points at same
point along path when extending a path (needed when several hand-drawn
strokes are merged into one path).  (I think Inkscape's method deals
with this better.)


 * Graffiti markup:

  http://www.graffitimarkuplanguage.com/about/
  http://www.graffitimarkuplanguage.com/g-m-l-spec/

  Includes parameters for speed, drip, rotation, etc.

Tav

Received on Wednesday, 15 May 2013 11:42:01 UTC