Glimmer Labs wrote:
Working with previous objects (ones you did not create):
Basically you select objects in a layer or document and get the id's from the selection. I've also added a selection_box to make this easier. A functional programmer could map a filter function onto selection_get() and set the result as the new selection. Then you could write a function to get whatever you needed: Select_blue_objects() Select_larger_than (50) Select_by_alpha (<, .5). The possibilities are endless (of course you could do this imperatively, but where's the fun in that?)
This is exactly what I wanted to hear. Now does this behavior mandate that every element have an id attribute. I think Inkscape does this by default now. But it is not required by SVG and Jon Cruz has mentioned many times in the past that he would like to change our behavior. Are we talking id attributes or is there a unique id per element inside of Inkscape? How do we access elements that are placed outside of the visible SVG body and can't take part in a selection in Inkscape?
Nested transformations have been a bit of a problem in our current extensions because we are processing the raw XML and no one had put in the effort to write a tool that knows about these nested transforms. Its been so long since I worked with it that I don't remember exactly what the problems where. Are there circumstances when nested transformations will need to be taken into account to use your API or will it likely be transparent to the user because we are using Inkscape?
Aaron Spike