LGM 2012Johan B. C. Engelen4 May 2012  Variable stroke width in Inkscape                                      © 2009 IBM C...
Outline    ■   Live Path Effects    ■   LPE examples    ■   Powerstroke2       4 May 2012   LGM 2012 - Johan B. C. Engelen...
Live Path Effects = “LPE”    ■   Live on-canvas editability of non-destructive path modifications    ■   Since GSoC 2007 →...
Live Path Effects – Possibilities and limitations    ■   Path output only              – Style (color, gradient, etc.) can...
LPE examples5   4 May 2012   LGM 2012 - Johan B. C. Engelen - Inkscape
LPE Powerstroke    ■   Variable stroke width along a path    ■   Width is edited using the purple knots    ■   Stored in S...
Powerstroke output    ■   Output is a path outline              – Filling the result looks like a stroked path7       4 Ma...
Powerstroke – Joins    ■   SVG defines 3 types              – Bevel              – Rounded              – Miter (a hat)   ...
Powerstroke – Sorting control points    ■   Control points are sorted automatically    ■   Can be turned off for advanced ...
LPE Clone original path ■   Accompanying LPE to fill powerstroked paths ■   Outputs the original-d path from a referenced ...
Future work ■   Improve the math          – Fix outline for overlapping parts          – Speed? ■   Improve UI          – ...
12   4 May 2012   LGM 2012 - Johan B. C. Engelen - Inkscape
Upcoming SlideShare
Loading in …5
×

Powerstroke: variable stroke width in Inkscape

3,599 views
3,343 views

Published on

With the advent of Live Path Effects (LPEs) and especially the pattern-along-path LPE, it became possible to edit a path's stroke width live on-canvas. The pattern-along-path LPE was however not designed for variable stroke width use, resulting in a very awkward UI experience. Powerstroke is the name of an upcoming LPE dedicated to variable stroke width.

Published in: Technology, Art & Photos
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,599
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Powerstroke: variable stroke width in Inkscape

  1. 1. LGM 2012Johan B. C. Engelen4 May 2012 Variable stroke width in Inkscape © 2009 IBM Corporation
  2. 2. Outline ■ Live Path Effects ■ LPE examples ■ Powerstroke2 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape
  3. 3. Live Path Effects = “LPE” ■ Live on-canvas editability of non-destructive path modifications ■ Since GSoC 2007 → Inkscape 0.46 ■ Mechanism 1. Store original path in inkscape:original-d attribute in SVG 2. Do math ← LPE 3. Write result to the d SVG attribute (the normal SVG path data location) ■ Other SVG editors/viewer will only see the result after the LPE ■ Live Math Effects – Heavy use of lib2geom – lib2geom workshop in the afternoon3 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape
  4. 4. Live Path Effects – Possibilities and limitations ■ Path output only – Style (color, gradient, etc.) cannot be modified by an LPE – For example, LPE Interpolate only interpolates path data, not colors ■ LPE stack: effects in series (!!!)4 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape
  5. 5. LPE examples5 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape
  6. 6. LPE Powerstroke ■ Variable stroke width along a path ■ Width is edited using the purple knots ■ Stored in SVG as a list of (location, width) pairs 0, 5 1.6, 6.3 2.4, 7.3 2.7, 6.4 3 , 2.2 ■ Work in progress! ■ To try it out: it is currently in trunk!6 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape
  7. 7. Powerstroke output ■ Output is a path outline – Filling the result looks like a stroked path7 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape
  8. 8. Powerstroke – Joins ■ SVG defines 3 types – Bevel – Rounded – Miter (a hat) ■ Powerstroke adds 2 new types – Spiro (sort of rounded) – Extrapolated (sort of miter)8 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape
  9. 9. Powerstroke – Sorting control points ■ Control points are sorted automatically ■ Can be turned off for advanced use9 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape
  10. 10. LPE Clone original path ■ Accompanying LPE to fill powerstroked paths ■ Outputs the original-d path from a referenced path – Ignores the original-d of the path it is applied to ■ Clone can have a style independent of style of the original (not possible with normal clones)10 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape
  11. 11. Future work ■ Improve the math – Fix outline for overlapping parts – Speed? ■ Improve UI – (more) Preset parameter styles • Saving of user presets? – Calligraphy tool option to output powerstroke path – On-canvas control of more parameters ■ Asymmetric stroke width ■ …? :-)11 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape
  12. 12. 12 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape

×