Hello,
I use inkscape almost everydays. that is a really great application. I convert all the windows users at my office to linux users. That was not that hard. I was 'forced' :-) to convert them from paintshoppro/illustrator to inkscape. That was quite easy too. Inkscape is such an friendly-user-app. We use it for cartography means : drawing polygons on rasters images. ok let's come to the question : Would it be possible to 'execute' an external binary on the active document? i read every mails for such a long time and aware (it's good to be aware) of the coming extension stuff. how will it work ? would it be possible to provide a 'simple' binary that do the job and just put it in some place ? (like C or C++ or whatever) what could the junction with inkscape be ? will all the changes made by the binary be updated in the preview immedilately ? how could that come from a menu in inkscape ?
ok... why all these question ?? in fact i will have some times and needs in adding new features related to GIS (of course openGis specs compliant) and some new 'magic' operation such areas and so... the problems is i am not a c nor c++ prog as anyone on the list. I am realy used to php and web. I started to implement these operations on php-web-based : you upload the file and the not-that-magic-stuff was done. i am considering to make a php extension for that and therefore it could be, for some, inkscape-inside implemented. BUT (here comes the BUT again..) i can not dive into inkscape (i have not enought time to do it) and i am not sufficiently competent to do it and i didn't succeded in having a configure-make-ready-box for inkscape (very much dependances on a redhat 9). the easy way would be such an extension stuff and when it works as expected someone with much more skills could add a new stuff in inkscape open-gis related.
Sorry for that long and bad-english mail. What do you think of it ? hervé
On Wed, 2004-07-28 at 01:56, herve couvelard wrote:
I use inkscape almost everydays. that is a really great application. I convert all the windows users at my office to linux users. That was not that hard. I was 'forced' :-) to convert them from paintshoppro/illustrator to inkscape. That was quite easy too. Inkscape is such an friendly-user-app. We use it for cartography means : drawing polygons on rasters images.
Sounds very cool. If there is any examples that you could show us, that would be very cool. Also, if you wanted to write up your experiences I know that we'd link to it on the website -- I'm sure that other websites would be interested also.
(also, if you wanted to do it in English, I would be willing to help edit -- I'm sure others would too)
ok let's come to the question : Would it be possible to 'execute' an external binary on the active document? i read every mails for such a long time and aware (it's good to be aware) of the coming extension stuff. how will it work ? would it be possible to provide a 'simple' binary that do the job and just put it in some place ? (like C or C++ or whatever) what could the junction with inkscape be ? will all the changes made by the binary be updated in the preview immedilately ? how could that come from a menu in inkscape ?
That is most definitely the plan! It is cool to have a user request it as much as we say: "users would like this" :) Right now we are working out the details, Bryce and I hope to have something very solid done this weekend.
What we are currently planning is that there will be a menu entitled "Effects" in Inkscape. This will probably start out small, but will hopefully grow to have lots of things that can be done in Inkscape. The way that each of these will work is to take the current document, modify it in some way, and then have that modified document be the new document. Some possible effects would be like drop shadow, where you could select a square in Inkscape, click on Effects > Dropshadow, and then there will be a square with a shadow behind it in your document.
We're planning multiple ways that someone could write these Effects. But definitely one way will be a script on the command line. That script will be given an SVG document, a list of the elements in that document that are selected, and then it should return an SVG document where the effect has been applied. We're calling this 'scripting'. Currently this is done for most of the open/save formats that Inkscape supports.
Also, you talked a little bit about how these are added. Currently, if you look, there will be a bunch of files that end in '.inkmod' that are installed with Inkscape. While these will change name to '.inx', Inkscape will continue to read these files on startup. If you make more of these files, there will be more extensions in your system.
I'm very excited by your use of Inkscape - we're hoping to make the whole extensions system much more mature for 0.40. Please, if you could list some of your ideas, and what you would need to do those, we can make sure that those are possible.
--Ted
Ted Gould wrote:
On Wed, 2004-07-28 at 01:56, herve couvelard wrote:
I use inkscape almost everydays. that is a really great application. I convert all the windows users at my office to linux users. That was not that hard. I was 'forced' :-) to convert them from paintshoppro/illustrator to inkscape. That was quite easy too. Inkscape is such an friendly-user-app. We use it for cartography means : drawing polygons on rasters images.
Sounds very cool. If there is any examples that you could show us, that would be very cool. Also, if you wanted to write up your experiences I know that we'd link to it on the website -- I'm sure that other websites would be interested also.
I will try to take some times on hollidays for that.
ok let's come to the question : Would it be possible to 'execute' an external binary on the active document? i read every mails for such a long time and aware (it's good to be aware) of the coming extension stuff. how will it work ? would it be possible to provide a 'simple' binary that do the job and just put it in some place ? (like C or C++ or whatever) what could the junction with inkscape be ? will all the changes made by the binary be updated in the preview immedilately ? how could that come from a menu in inkscape ?
Also, you talked a little bit about how these are added. Currently, if you look, there will be a bunch of files that end in '.inkmod' that are installed with Inkscape. While these will change name to '.inx', Inkscape will continue to read these files on startup. If you make more of these files, there will be more extensions in your system.
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 ?
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 ?
I'm very excited by your use of Inkscape - we're hoping to make the whole extensions system much more mature for 0.40. Please, if you could list some of your ideas, and what you would need to do those, we can make sure that those are possible.
for example we could make sure that 2 points very very close are at the same coordinates, for exemple with the 2 polygones above b and E are at the same coordinates and c and H too. (i think there is already a snapping option for that no ?)
a b E F |- - - - -|-------| | | | | | | ------------------- d c H G
For exemple we could calculate an area of a polygone, given a scale.
one thing that would be cool for what we are doing, is to be able to apply the transformation of a group directly to the element of the groups (without the transform attribute on the group, directly to the coordinates of the path). (maybe it is allready possible to do that with preference ?)
the workaround we use is group, apply transformation, ungroup,selecte all ellement,and in the transform menu (Shift+ctrl+M) check relative and apply. (exemples below)
I will try to take some time to classify what we will try to implement. when i have a document ready i promise to send it to you.
hervé
for exemple i have 2 shapes. <path style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000001pt;" d="M -20.156306,515.80396 C 453.16195,444.14087 360.61774,375.20910 360.61774,375.20910 L 40.652079,440.71180 L -20.156306,515.80396 z " id="path837" /> <path style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.0000001pt;" d="M 259.96868,559.36605 C 733.28693,487.70297 640.74272,418.77121 640.74272,418.77121 L 320.77705,484.27390 L 259.96868,559.36605 z " id="path838" />
i group them and apply a rotation to the group. the g becomes : <g id="g849" transform="matrix(0.885957,0.463767,-0.463767,0.885957,252.5163,-92.30883)"> and the shapes stays identicals
it would be cool to have directly : <g id="g849"> <path style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999990pt;" d="M -4.5541753,355.32347 C 448.02042,511.34244 397.99851,407.35291 397.99851,407.35291 L 84.144705,316.99597 L -4.5541753,355.32347 z " id="path837" /> <path style="fill:none;fill-opacity:0.75000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999990pt;" d="M 223.42186,523.83033 C 675.99645,679.84931 625.97453,575.85978 625.97453,575.85978 L 312.12072,485.50283 L 223.42186,523.83033 z " id="path838" /> </g>
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
[Tips and Tricks, how to get the coordinates to change instead of applying a transformation]
one thing that would be cool for what we are doing, is to be able to apply the transformation of a group directly to the element of the groups (without the transform attribute on the group, directly to the coordinates of the path). (maybe it is allready possible to do that with preference ?)
the workaround we use is group, apply transformation, ungroup,selecte all ellement,and in the transform menu (Shift+ctrl+M) check relative and apply. (exemples below)
Thanks for that tip. I've been wondering if there was a way to workaround it.
Sincerely
Alan Horkan http://advogato.org/person/AlanHorkan/
one thing that would be cool for what we are doing, is to be able to apply the transformation of a group directly to the element of the groups (without the transform attribute on the group, directly to the coordinates of the path). (maybe it is allready possible to do that with preference ?)
This can be added (file a RFE), but out of curiosity, why do you need that?
bulia byak wrote:
one thing that would be cool for what we are doing, is to be able to apply the transformation of a group directly to the element of the groups (without the transform attribute on the group, directly to the coordinates of the path). (maybe it is allready possible to do that with preference ?)
This can be added (file a RFE), but out of curiosity, why do you need that?
well i will try out to file a RFE.
We use inkscape for GIS stuff on forest : we load rasters images (geolocated by one or two points) and draw polygons on it (representing existing elements in the foret.) -> these elements are geolocated (as their positions are know (relatively ?? ) to the geolocated images. We, for the moment, 'flatten' transformations within a php-script on upload(because the path coordinates of the elements within a group are realy accurate only if the group as no transform). That would be, at least for us, a good time-gainning if the document could do that directly.
Then we upload the svg-file and, easily with a php script, we insert the drawned objects in a database, geolocated in coordinates Lambert II. And it becomes possible to create interactive-maps
A) interactivity like creating swf movie with phpming or interacting with the database with action-script and php on a flash-movie-container.[ We would much preffer to use the svg stuff directly into browser but players/extension/ for svg are not sufficiently mature/supported. And when svg on the web will be well supported we could drop flash directly because our datas are in svg format. B) interactivity like request-created maps upon criterias.
Yes it exist some GIS softs, and yes one could says that we are redesining the wheel but that is not my opinion. Inkscape is free software (free as in freedom), Inkscape is easy and friendly to use. And inkscape is the best svg editor wysiwyg ? :-) i know and inkscape is on win nux and almost on mac. The use of svg today will permit as the time goes by, in the near futur (12-18 months?? ), when vrml or another xml-base-3D-ForTheWeb-W3Ccompliant will be mature enought (and when exists a player free as freddom, easy to install and to use etc..... on win linux osx [looking on freewrl]) we could directly created some 3D-realtime-web-based 'worlds' of the forests we have on our databases with their elements.
That is a little "tomorrow will be a wonderfull world with wonderfull things and wonderfull peoples" thinking but i want to beleive it is possible. And if I gain skills and have some time, making the choice of free software (as in freedom) gives me the possibility to make these things happen by contributting, even if big-software-companies don't think it would be profitable and don't devellop that way.
whouu... such a loooooonnnnnnnngggggggggggg response. Xcuse for the real bad english.
herve
On Wed, 2004-07-28 at 11:25, Ted Gould wrote:
What we are currently planning is that there will be a menu entitled "Effects" in Inkscape. This will probably start out small, but will hopefully grow to have lots of things that can be done in Inkscape.
Hmm, I'm not sure that is the best name for it, since it will include programs that e.g. perform semantic/syntactic (rather than strictly visual) changes as well.
One example might be a program that takes an SVG fragment, does a database lookup based on some of its attributes, and then adds some metadata from the result of the lookup to the SVG.
-mental
On Wed, 2004-07-28 at 21:04, MenTaLguY wrote:
What we are currently planning is that there will be a menu entitled "Effects" in Inkscape. This will probably start out small, but will hopefully grow to have lots of things that can be done in Inkscape.
Hmm, I'm not sure that is the best name for it, since it will include programs that e.g. perform semantic/syntactic (rather than strictly visual) changes as well.
One example might be a program that takes an SVG fragment, does a database lookup based on some of its attributes, and then adds some metadata from the result of the lookup to the SVG.
Well, we chose 'Effects' because 'Filters' is taken by SVG Filters. I think that we want to get something that is close to what people are familiar with. And, for the most part, I think there will probably be more that cause visual effects more than semantic/syntactic changes.
--Ted
ok let's come to the question : Would it be possible to 'execute' an external binary on the active document?
That is most definitely the plan! It is cool to have a user request it as much as we say: "users would like this" :) Right now we are working out the details, Bryce and I hope to have something very solid done this weekend.
I was thinking more precisely about that and 2 questions came in my mind :
Would it be possible to define sub-menus in the .inkmode files ? exemples : EFFECTS (native inkscape menu) |- dropshadow (plug-in 1 defined as dropshadow) |- roundhole (plug-in 2 defined as roudhole) |- specials |- area (plug-in 3 defined as specials/area ) |- center (plug-in 4 defined as specials/center ) |- transform... (plug-in 5 defined as transform)
that would permit easily to categorize the effects by the persons who write thoses plugs-in. If the numbers of plugs-in become important it would really help. And that would permit hackers-users to personnalise differently (manualy edditing the .inkmodes files) the menus of effects (or whatever it's name).
the second question : would not it be a good idea to collected a possible error message from the plug-in. if everything went fine the pug-in return the svg-string(maybe parsed by inkscape in order to not change the 'z' position of the path if it was sent 2 or more elements not from the same group) if something went wrong the plug-in could sent a string like : <error type="attention">You need at least 2 elements to do that</error> or <error type="critical">You need to have perl:svg to proceed that transformation</error>
That could be a good thing to handle some error-messages from the plug-in.
hervé
participants (6)
-
Alan Horkan
-
Bryce Harrington
-
bulia byak
-
herve couvelard
-
MenTaLguY
-
Ted Gould