Difference between revisions of "LivePathEffects Discussion"
Jump to navigation
Jump to search
Johanengelen (talk | contribs) |
Johanengelen (talk | contribs) |
||
Line 60: | Line 60: | ||
<defs> | <defs> | ||
... | ... | ||
<inkscape:path-effect xlink:href= | <inkscape:path-effect xlink:href="x-inkscape-plugin:org.inkscape.effect.foo" id="path-effect2"> | ||
<inkscape:param name= | <inkscape:param name="blah" value="foo" /> | ||
</inkscape:path-effect> | </inkscape:path-effect> | ||
... | ... | ||
</defs> | </defs> | ||
... | ... | ||
<svg:path ... inkscape:path-effects= | <svg:path ... inkscape:path-effects="#path-effect2 ..." /> | ||
... | ... | ||
</svg:svg> | </svg:svg> | ||
</pre> | </pre> | ||
Looks alot like gradients. | |||
* upside: you can apply the same effect (with equal params) to different objects very easily. |
Revision as of 19:29, 8 May 2007
Discussion page for Johan's Live Path Effects project for GSoC2007.
What is a Live Path Effect?
- Spiral/star tool?
- Skeletal strokes
- whirl
What's it look like in SVG?
Simple idea
<path inkscape:original-d = "..." (the original path that now has an applied effect) d="..." (the output of the live-effect) inkscape:path-effect="..." (string with the name of the applied effect) inkscape:path-effect-param1= ... (can be anything) inkscape:path-effect-param2 , etc />
This is what is implemented at this moment.
- No chaining possible
- Difficult to determine path-effect-param type from SVG.
- not extendable (8 params max at the moment by copy-paste coding)
Like style atribute
<path inkscape:original-d = "..." d="..." inkscape:path-effect="sample1(param1:0.0;param2:loopy;) sample2(paramA:45;)" />
- Parser needed
- LPE class that stores its own params
<inkscape:patheffect>
<svg:path d="M 1 2 L 3 4"> <inkscape:patheffect effect="org.inkscape.patheffect.a"> <inkscape:param name="foo" value="bob" /> <inkscape:param name="bar" value="jack" /> </inkscape:patheffect> <inkscape:patheffect effect="org.inkscape.patheffect.b"> <inkscape:param name="zort" value="true" /> </inkscape:patheffect> <inkscape:patheffect effect="org.inkscape.patheffect.a"> <inkscape:param name="foo" value="alvin" /> <inkscape:param name="bar" value="jack" /> </inkscape:patheffect> </svg:path>
defs section
<svg:svg> ... <defs> ... <inkscape:path-effect xlink:href="x-inkscape-plugin:org.inkscape.effect.foo" id="path-effect2"> <inkscape:param name="blah" value="foo" /> </inkscape:path-effect> ... </defs> ... <svg:path ... inkscape:path-effects="#path-effect2 ..." /> ... </svg:svg>
Looks alot like gradients.
- upside: you can apply the same effect (with equal params) to different objects very easily.