I think I may have found the idea to resolve the issue I myself submitted: http://sourceforge.net/tracker/index.php?func=detail&aid=1261413&gro...
I would like to try and write an extension in perl. I have never writen any plugin, but it looks possible for me to complete.
After a quick look at perl dropshadow plugin and SpSVG.pm, the only problem I seem to have is how I should ask inkscape to pass the coordinates of selected nodes. It will have to be passed to my script together with object id. Can anybody help?
Karol
Karol Kreński wrote:
I think I may have found the idea to resolve the issue I myself submitted: http://sourceforge.net/tracker/index.php?func=detail&aid=1261413&gro...
I would like to try and write an extension in perl. I have never writen any plugin, but it looks possible for me to complete.
After a quick look at perl dropshadow plugin and SpSVG.pm, the only problem I seem to have is how I should ask inkscape to pass the coordinates of selected nodes. It will have to be passed to my script together with object id. Can anybody help?
Inkscape passes your script the SVG file and the ids of selected objects. So tthe coord of all points are available to you. There isn't any way to pass selected nodes yet. And I guess I personally don't think we should try to hammer something in. That sort of tightly coupled behavior should be possible when internal extensions are finished.
Aaron Spike
On Wed, Aug 17, 2005 at 08:06:02AM -0500, Aaron and Sarah Spike wrote:
Karol Kreński wrote:
I think I may have found the idea to resolve the issue I myself submitted: http://sourceforge.net/tracker/index.php?func=detail&aid=1261413&gro...
I would like to try and write an extension in perl. I have never writen any plugin, but it looks possible for me to complete.
After a quick look at perl dropshadow plugin and SpSVG.pm, the only problem I seem to have is how I should ask inkscape to pass the coordinates of selected nodes. It will have to be passed to my script together with object id. Can anybody help?
Inkscape passes your script the SVG file and the ids of selected objects. So tthe coord of all points are available to you. There isn't any way to pass selected nodes yet. And I guess I personally don't think we should try to hammer something in. That sort of tightly coupled behavior should be possible when internal extensions are finished.
Any expectation how much time it is going to take before a plugin has access to selected nodes coords? Can't figure it out based on roadmap document.
Karol
On Aug 17, 2005, at 7:03 AM, Karol Kreński wrote:
Any expectation how much time it is going to take before a plugin has access to selected nodes coords? Can't figure it out based on roadmap document.
Hmmm...
My guess would be somewhere between 3 weeks and a year.
:-)
Seriously, though, the intent is to get to those fairly soon. We have many separate things converging on a general solution, and different parts may show up at different times.
Currently on the roadmap in the Wiki it looks like much of this is targeted for 0.43 and 0.44. DOM and Swig will give plugins access to the SVG tree through standard bindings. Getting the DOM going and any needed support functions is probably where more work is going to be needed, and the actual binding to languages probably is far less.
Karol Kreński wrote:
On Wed, Aug 17, 2005 at 08:06:02AM -0500, Aaron and Sarah Spike wrote:
Karol Kreński wrote:
I would like to try and write an extension in perl. I have never writen any plugin, but it looks possible for me to complete.
After a quick look at perl dropshadow plugin and SpSVG.pm, the only problem I seem to have is how I should ask inkscape to pass the coordinates of selected nodes. It will have to be passed to my script together with object id. Can anybody help?
Inkscape passes your script the SVG file and the ids of selected objects. So tthe coord of all points are available to you. There isn't any way to pass selected nodes yet. And I guess I personally don't think we should try to hammer something in. That sort of tightly coupled behavior should be possible when internal extensions are finished.
Any expectation how much time it is going to take before a plugin has access to selected nodes coords? Can't figure it out based on roadmap document.
I think there is an approach that will solve your problems today rather than waiting. If you use the SVG.pm Perl module (or even the XML one really) you can get the coordinates out of the SVG file that is passed in. Yes, this isn't Inkscape giving you those values, but you can adequately get them for most applications. If you need bounding boxes (which you'd need a renderer for) you can recursively call Inkscape using the Inkscape command line interface to have Inkscape calculate them.
--Ted
On Thu, Aug 18, 2005 at 03:02:06PM -0700, Ted Gould wrote:
Karol Kreński wrote:
On Wed, Aug 17, 2005 at 08:06:02AM -0500, Aaron and Sarah Spike wrote:
Karol Kreński wrote:
I would like to try and write an extension in perl. I have never writen any plugin, but it looks possible for me to complete.
After a quick look at perl dropshadow plugin and SpSVG.pm, the only problem I seem to have is how I should ask inkscape to pass the coordinates of selected nodes. It will have to be passed to my script together with object id. Can anybody help?
Inkscape passes your script the SVG file and the ids of selected objects. So tthe coord of all points are available to you. There isn't any way to pass selected nodes yet. And I guess I personally don't think we should try to hammer something in. That sort of tightly coupled behavior should be possible when internal extensions are finished.
Any expectation how much time it is going to take before a plugin has access to selected nodes coords? Can't figure it out based on roadmap document.
I think there is an approach that will solve your problems today rather than waiting. If you use the SVG.pm Perl module (or even the XML one really) you can get the coordinates out of the SVG file that is passed in. Yes, this isn't Inkscape giving you those values, but you can adequately get them for most applications. If you need bounding boxes (which you'd need a renderer for) you can recursively call Inkscape using the Inkscape command line interface to have Inkscape calculate them.
Are we talking about *currently selected / active* nodes? Say a path made of 10 nodes and only 2 of them are now selected by the user, just before he calls my plugin. I need just those two, not all the nodes on path of id=xyz.
Karol
participants (5)
-
Aaron and Sarah Spike
-
Jon A. Cruz
-
Karol Krenski
-
Karol Kreński
-
Ted Gould