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
>>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
>>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
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
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.
for exemple i have 2 shapes.
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 "
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 "
i group them and apply a rotation to the group.
the g becomes :
and the shapes stays identicals
it would be cool to have directly :
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 "
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 "