
On 3/22/06, ted@...11... <ted@...11...> wrote:
Okay, perhaps I'm confused. The path effects stuff is adding operations that will execute when a path is edited. So, this would be like an effect, but limited only to single paths. I guess I think of this more like 'brushes'.
I'm not sure "brushes" is a good term. Its primary uses will be any effects that take a path and return another path. This includes all kinds of randomization, fractalizing, smoothing, rounding corners, distortions, etc. etc. It's not specifically for doing something to the stroke, which the "brush" implies. What it is is a generic path twister. The only prerequisite is for the object to be a path (or a shape, which is internally a path). That's why we call them Path Effects.
So you can control how the path is drawn, by having a custom operation edit the path based on the core path.
Not even "how it's drawn", but more generically "what other path is drawn instead, based on this source path".
BTW, I'd love to see the caligraphy tool refactored in this way, so that you can move the line, adjust the tilt, all after the line had been drawn.
Yes, eventually this fits into path effects as well. You take the source path and some parameters (widths array) and you create another path (variable-width stroke) to display instead.
I guess what I didn't see in your write up was anyway to connect paths together, or to work on groups of objects. Both of those would really be required for anything to work with the Effects today.
If an effect just depends on another path but maps source path to output 1:1 (e.g. envelope), then it's doable with the current implementation. You'll just need to make one of the effect params to be a link to the envelope path, and add listeners to update it when the envelope is edited.
If however your mapping is not 1:1 (e.g. blend), then the Path Effects are of little help. You need a new SPObject type for that, typically a derivative of a group with specialized properties. In fact, even envelopes are best implemented this way too, not as path effects, so that enveloping is possible not only on single paths but on groups. I have another plan for that, which you can read here:
http://wiki.inkscape.org/wiki/index.php/PerspectiveObject
As for making the path effects into scripts, I think that would be cool. I think that the only thing that would be required is having one "easy to use" entry point. Something like:
string mung_this (string in);
Where both of the strings are the list of points in the "SVG d style".
You also need a number of parameters, whose number and interpretation will vary by effect.
Would that work with your guy's proposal? I may be missing the point, but is "brushes" a good name?
No, see above :)
On an sorta unrelated note: It would be really cool if someone made a font where all the characters were a single path for use with this. Then you could write some text, and easily use a 'brush' on it.
Convert any text to path and combine the paths (in fact they are already combined, currently which needs to be have been fixed 100 years ago).
-- bulia byak Inkscape. Draw Freely. http://www.inkscape.org