[PD] rfc: data structure drawing command names
jancsika at yahoo.com
Tue Sep 16 21:55:30 CEST 2014
I've got a nice collection of new drawing commands in Pd-l2ork for drawing scalars that are (mostly) based on the svg spec from HTML5. Currently they are named [draw $shape], where $shape can be an svg shape, path, or also some higher-level convenience command like a sprite. (There is also [group] for svg groups, which should probably be [draw group].) Arguments set the initial coordinate data, like [draw line 0 0 40 40], but coords and attributes like color/opacity/transform can also be set and/or changed by sending messages to the object.
What do people think of this kind of two word naming scheme, as compared to Pd Vanilla's where the name of the shape is in the selector like [drawcurve] or [drawpolygon]? I don't usually like the two word naming scheme, like the [list] objects. But in this case, the object interface is the same no matter what shape is chosen. (Nearly because [draw sprite] has a method for setting the index.) So everything really is one class called "draw", and the shape-- though it cannot be changed after instantiation-- is data that determines how to interpret the rest of the args plus any attributes set by sending messages.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list