On Wed, 28 Jul 2004, herve couvelard wrote:
ok i understood approximatively the thing. i looked a little in the .inkmod files in the inkscape.38 sources i have. there are 2 files for an extension : the .inkmod file that 'xml-describe' the extension and the 'binary' itself. As i understood when inkscape starts up it reads the extension-directory and 'construct' the extension menu in 'inkscape-live'. So what one need is to know how to construct the .inkmod file. That seems to be simple. the other need is to know what is recieved by the binary itself (the-all-svg-file or some selected elements) and return what it received after transformation. for exemple dropshadow could receive one element (a path or a group or a bunch of path) and apply shadow on the element (or on each element of the group or on each element that was sent) and return the thing it received (a string), then inkscape change the elements it sent (a string) to the element it receives (a new string). Is that it ?
Yup.
As inkscape reads the directory where .inkmode files are, you don't have to compile inkscape to create a new extension, just put those 2 files in the dir. Right ? And in the description-file (the .inkmode one) you can specifies what are the name in the menu (with submenus ?) is that right ?
I think that receiving a string (a portion of svg document with what is selected and not the entire document) and resending a string would be the paradise-on-earth. Is that how it works ?
Yes. Look at the roundhole script as an example of this.
Bryce