
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.