Hi all,
Currently, when an unknown LPE is applied to a path, inkscape ignores the whole LPE stack on that path and simply draws the 'd' attribute. (so the path is not resetted or anything. the path will look like intended and like it is shown in all other SVG readers).
My problem now is: what to do for other shapes? (stars, circles, etc.). I guess the best thing to do is have a popup upon loading the file that asks the user whether he wants to convert that shape to a simple path, such that it will look like intended. I don't know whether this (convert e.g. a star to a path), while loading the file, will make inkscape unstable...
Any help is appreciated,
Johan
On Sat, May 16, 2009 at 2:23 PM, <J.B.C.Engelen@...1578...> wrote:
My problem now is: what to do for other shapes? (stars, circles, etc.). I guess the best thing to do is have a popup upon loading the file that asks the user whether he wants to convert that shape to a simple path, such that it will look like intended.
I don't think any popup is needed. Note that this "conversion" is nondestructive - you don't change anything in SVG (until you try to edit that shape), you just reinterpret it as path at the level of editing behavior. So just do this reinterpretation quietly - I think that is the wisest thing to do anyway: you preserve appearance and editability of the object even if not as a LPE.
We also need to take care about future-compatibility: when we see a LPE we don't support, not only do we ignore it upon load, but when the user tries to edit the path, any LPE attributes in it must be cleared, so that the edit is not discarded if later you load the file in another version which does support that LPE. For shapes, this means discarding their sodipodi:role and shape attributes as well.
The only sore point in this approach is the rect, because it uses svg:rect instead of svg:path (unlike all other shapes). So in fact, we cannot use any LPEs on rects at all, nor use any markers with it, etc. Until and unless we switch it to svg:path one day (I've been planning to do this for a long time, but it's a controversial subject and I haven't yet made up my mind - there are users who complain that we don't use svg:circle for circles, etc.) we must add code to prevent setting LPE on rects.
On Sat, May 16, 2009 at 11:06 PM, bulia byak wrote:
haven't yet made up my mind - there are users who complain that we don't use svg:circle for circles, etc.) we must add code to prevent setting LPE on rects.
Well, some exporters create files with non-editable elements like svg:circle or svg:polyline. Could we possibly make Inkscape silently convert them to what it can deal with?
Alexandre
On Mon, May 18, 2009 at 9:26 AM, Alexandre Prokoudine
Well, some exporters create files with non-editable elements like svg:circle or svg:polyline. Could we possibly make Inkscape silently convert them to what it can deal with?
I think we can edit them - the circle at least, not sure about polyline. Is there a bug for this?
On Mon, May 18, 2009 at 6:39 PM, bulia byakwrote:
On Mon, May 18, 2009 at 9:26 AM, Alexandre Prokoudine
Well, some exporters create files with non-editable elements like svg:circle or svg:polyline. Could we possibly make Inkscape silently convert them to what it can deal with?
I think we can edit them - the circle at least, not sure about polyline. Is there a bug for this?
Not for polylines at least. Would you want one? I think I could even provide a sample :)
Alexandre
On Mon, May 18, 2009 at 11:05 AM, Alexandre Prokoudine
Not for polylines at least. Would you want one? I think I could even provide a sample :)
Of course it's always better to have it documented in a bug (at least, unless you can fix it on the spot :)
On Mon, May 18, 2009 at 7:17 PM, bulia byak wrote:
On Mon, May 18, 2009 at 11:05 AM, Alexandre Prokoudine
Not for polylines at least. Would you want one? I think I could even provide a sample :)
Of course it's always better to have it documented in a bug (at least, unless you can fix it on the spot :)
https://bugs.launchpad.net/inkscape/+bug/377982
Alexandre
participants (3)
-
unknown@example.com
-
Alexandre Prokoudine
-
bulia byak