lgm 2012 johan b. c. engelen 4 may 2012 · 3 4 may 2012 lgm 2012 - johan b. c. engelen - inkscape...
TRANSCRIPT
![Page 1: LGM 2012 Johan B. C. Engelen 4 May 2012 · 3 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape Live Path Effects = “LPE” Live on-canvas editability of non-destructive path](https://reader034.vdocuments.mx/reader034/viewer/2022050104/5f43274a45f9d21e1d4af50a/html5/thumbnails/1.jpg)
© 2009 IBM Corporation
Variable stroke width in Inkscape
LGM 2012Johan B. C. Engelen4 May 2012
![Page 2: LGM 2012 Johan B. C. Engelen 4 May 2012 · 3 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape Live Path Effects = “LPE” Live on-canvas editability of non-destructive path](https://reader034.vdocuments.mx/reader034/viewer/2022050104/5f43274a45f9d21e1d4af50a/html5/thumbnails/2.jpg)
4 May 20122 LGM 2012 - Johan B. C. Engelen - Inkscape
Outline
■ Live Path Effects
■ LPE examples
■ Powerstroke
![Page 3: LGM 2012 Johan B. C. Engelen 4 May 2012 · 3 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape Live Path Effects = “LPE” Live on-canvas editability of non-destructive path](https://reader034.vdocuments.mx/reader034/viewer/2022050104/5f43274a45f9d21e1d4af50a/html5/thumbnails/3.jpg)
4 May 20123 LGM 2012 - Johan B. C. Engelen - Inkscape
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 afternoon
![Page 4: LGM 2012 Johan B. C. Engelen 4 May 2012 · 3 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape Live Path Effects = “LPE” Live on-canvas editability of non-destructive path](https://reader034.vdocuments.mx/reader034/viewer/2022050104/5f43274a45f9d21e1d4af50a/html5/thumbnails/4.jpg)
4 May 20124 LGM 2012 - Johan B. C. Engelen - Inkscape
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 (!!!)
![Page 5: LGM 2012 Johan B. C. Engelen 4 May 2012 · 3 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape Live Path Effects = “LPE” Live on-canvas editability of non-destructive path](https://reader034.vdocuments.mx/reader034/viewer/2022050104/5f43274a45f9d21e1d4af50a/html5/thumbnails/5.jpg)
4 May 20125 LGM 2012 - Johan B. C. Engelen - Inkscape
LPE examples
![Page 6: LGM 2012 Johan B. C. Engelen 4 May 2012 · 3 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape Live Path Effects = “LPE” Live on-canvas editability of non-destructive path](https://reader034.vdocuments.mx/reader034/viewer/2022050104/5f43274a45f9d21e1d4af50a/html5/thumbnails/6.jpg)
4 May 20126 LGM 2012 - Johan B. C. Engelen - Inkscape
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.32.4, 7.32.7, 6.4 3 , 2.2
■ Work in progress!
■ To try it out: it is currently in trunk!
![Page 7: LGM 2012 Johan B. C. Engelen 4 May 2012 · 3 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape Live Path Effects = “LPE” Live on-canvas editability of non-destructive path](https://reader034.vdocuments.mx/reader034/viewer/2022050104/5f43274a45f9d21e1d4af50a/html5/thumbnails/7.jpg)
4 May 20127 LGM 2012 - Johan B. C. Engelen - Inkscape
Powerstroke output
■ Output is a path outline– Filling the result looks like a stroked path
![Page 8: LGM 2012 Johan B. C. Engelen 4 May 2012 · 3 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape Live Path Effects = “LPE” Live on-canvas editability of non-destructive path](https://reader034.vdocuments.mx/reader034/viewer/2022050104/5f43274a45f9d21e1d4af50a/html5/thumbnails/8.jpg)
4 May 20128 LGM 2012 - Johan B. C. Engelen - Inkscape
Powerstroke – Joins
■ SVG defines 3 types– Bevel– Rounded– Miter (a hat)
■ Powerstroke adds 2 new types– Spiro (sort of rounded)– Extrapolated (sort of miter)
![Page 9: LGM 2012 Johan B. C. Engelen 4 May 2012 · 3 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape Live Path Effects = “LPE” Live on-canvas editability of non-destructive path](https://reader034.vdocuments.mx/reader034/viewer/2022050104/5f43274a45f9d21e1d4af50a/html5/thumbnails/9.jpg)
4 May 20129 LGM 2012 - Johan B. C. Engelen - Inkscape
Powerstroke – Sorting control points
■ Control points are sorted automatically
■ Can be turned off for 'advanced' use
![Page 10: LGM 2012 Johan B. C. Engelen 4 May 2012 · 3 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape Live Path Effects = “LPE” Live on-canvas editability of non-destructive path](https://reader034.vdocuments.mx/reader034/viewer/2022050104/5f43274a45f9d21e1d4af50a/html5/thumbnails/10.jpg)
4 May 201210 LGM 2012 - Johan B. C. Engelen - Inkscape
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)
![Page 11: LGM 2012 Johan B. C. Engelen 4 May 2012 · 3 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape Live Path Effects = “LPE” Live on-canvas editability of non-destructive path](https://reader034.vdocuments.mx/reader034/viewer/2022050104/5f43274a45f9d21e1d4af50a/html5/thumbnails/11.jpg)
4 May 201211 LGM 2012 - Johan B. C. Engelen - Inkscape
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
■ …? :-)
![Page 12: LGM 2012 Johan B. C. Engelen 4 May 2012 · 3 4 May 2012 LGM 2012 - Johan B. C. Engelen - Inkscape Live Path Effects = “LPE” Live on-canvas editability of non-destructive path](https://reader034.vdocuments.mx/reader034/viewer/2022050104/5f43274a45f9d21e1d4af50a/html5/thumbnails/12.jpg)
4 May 201212 LGM 2012 - Johan B. C. Engelen - Inkscape