Creating custom objects

I've written a plugin for Skencil that allows LaTeX text objects to be included and rendered, and am assessing the viability for doing something similar in Inkscape. I've seen the extensions description from last year, but none of the extension objects there really seem to meet the need. What I'd be looking for is creating a new type of object that retains its identity as an object so that the text can be edited again.
So I'm interested in whether there are examples of something conceptually similar having been done already. Basically, the mechanism I'm looking for would allow an extension/plugin to:
- create a new object that can be later modified as an object (including after being saved and opened again) - accept user input for parameters that can later be changed - run an external program when an update is made - import an external file to replace the current object curves (I'
Once those things can be done, having a latex object is fairly trivial. I'd appreciate if someone could point to where to look for examples of extensions that do these things under inkscape.

I am sorry I can't answer your question about inkscape extensions. Hopefully someone who understands the extensions can provide an answer.
I will mention that I wrote an inkscape extension that takes a string, runs it through latex, then through pstoedit and skconvert to get an svg, and inserts the svg into a document. I am not much of a coder, so I have been trying to fix up the programming before I made a big deal out of it. As you mention, though, the process is fairly trivial, so you can probably reproduce my work in 15 minutes.
The only interesting aspect of what I wrote was the conversion of greek symbols to text. It is straightforward to convert all text to paths, and use the paths in the svg, but this results in some pretty ugly text. I found an inelegent way to convert greek letters to their unicode equivalent which somewhat solves this problem. Hopefully, you have a better solution. If not, I will be glad to provide what I have.
Rich.
On 6/23/05, SJ H <sjh345@...400...> wrote:
I've written a plugin for Skencil that allows LaTeX text objects to be included and rendered, and am assessing the viability for doing something similar in Inkscape. I've seen the extensions description from last year, but none of the extension objects there really seem to meet the need. What I'd be looking for is creating a new type of object that retains its identity as an object so that the text can be edited again.
So I'm interested in whether there are examples of something conceptually similar having been done already. Basically, the mechanism I'm looking for would allow an extension/plugin to:
- create a new object that can be later modified as an object
(including after being saved and opened again)
- accept user input for parameters that can later be changed
- run an external program when an update is made
- import an external file to replace the current object curves (I'
Once those things can be done, having a latex object is fairly trivial. I'd appreciate if someone could point to where to look for examples of extensions that do these things under inkscape.
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id%16492&opclick _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel

SJ H wrote:
I've written a plugin for Skencil that allows LaTeX text objects to be included and rendered, and am assessing the viability for doing something similar in Inkscape. I've seen the extensions description from last year, but none of the extension objects there really seem to meet the need. What I'd be looking for is creating a new type of object that retains its identity as an object so that the text can be edited again.
So I'm interested in whether there are examples of something conceptually similar having been done already. Basically, the mechanism I'm looking for would allow an extension/plugin to:
- create a new object that can be later modified as an object
(including after being saved and opened again)
- accept user input for parameters that can later be changed
- run an external program when an update is made
- import an external file to replace the current object curves (I'
Once those things can be done, having a latex object is fairly trivial. I'd appreciate if someone could point to where to look for examples of extensions that do these things under inkscape.
Well, to the extent that you are talking about, no that is not possible. It is someplace that I would like to take extensions in the future, but I'm afraid it isn't very close right now.
Now, that being said, I think there are some things that you could do. Inkscape will not remove extra data in the XML if it is done correctly (i.e. "mylatexplugin:myvalue='bob'"). So, you could create an effect which would operate on, and update that data. But, for someone to change it, they would have to select it, and run the effect again. Not the level of interactivity that you were looking for, but it is a possible work around.
--Ted

On 6/25/05, Ted Gould <ted@...11...> wrote:
Now, that being said, I think there are some things that you could do. Inkscape will not remove extra data in the XML if it is done correctly (i.e. "mylatexplugin:myvalue='bob'"). So, you could create an effect which would operate on, and update that data. But, for someone to change it, they would have to select it, and run the effect again. Not the level of interactivity that you were looking for, but it is a possible work around.
Actually, that doesn't sound too bad. At least with that implementation we can give it a go and check out the limitations.
From a user's perspective, it just means selecting a menu option to
edit the text - which isn't too bad. It would be interesting to see what Rich has, and if that can be extended easily enough.
Soren
participants (3)
-
rich kowalczyk
-
SJ H
-
Ted Gould