Mental or Bulia,
I've got a question... In looking at where marker stuff is hooked in I notice a lot of stuff in nr-arena-shape.cpp, which appears to be special casing marker elements as shape children. I'm attempting to add some documentation, but it's a little confusing to me. Could either of you explain what the design intent is for this?
In particular, I'm wondering why markers have this special case; it feels like an odd fit in nr-arena-shape since everything else is so generalized, and I'm wondering if there could be a way to generalize the markers so no special case is needed for them?
Bryce
On 11/18/06, Bryce Harrington <bryce@...961...> wrote:
In particular, I'm wondering why markers have this special case; it feels like an odd fit in nr-arena-shape since everything else is so generalized, and I'm wondering if there could be a way to generalize the markers so no special case is needed for them?
Perhaps that's because they really are a special case in SVG spec. Markers are shapes which are supposed to be updated and rendered with the main shape as if they are a group, but they are not regular objects and there's no real group involved. That alone is special enough, and as far as I can see, our code just reflects this. Or am I missing something?
On Sat, Nov 18, 2006 at 07:10:10PM -0400, bulia byak wrote:
On 11/18/06, Bryce Harrington <bryce@...961...> wrote:
In particular, I'm wondering why markers have this special case; it feels like an odd fit in nr-arena-shape since everything else is so generalized, and I'm wondering if there could be a way to generalize the markers so no special case is needed for them?
Perhaps that's because they really are a special case in SVG spec. Markers are shapes which are supposed to be updated and rendered with the main shape as if they are a group, but they are not regular objects and there's no real group involved. That alone is special enough, and as far as I can see, our code just reflects this. Or am I missing something?
I guess that makes sense, although I would wonder if rather than having the special case logic in nr-arena, if it would be better to give child items a flag to indicate them as 'non-group items', and handle that closer to the point where it matters.
Anyway, I guess it's fine this way but it just seems curious to have marker-specific stuff in such an otherwise general purpose file.
Bryce
On Sat, 2006-11-18 at 19:10 -0400, bulia byak wrote:
Perhaps that's because they really are a special case in SVG spec. Markers are shapes which are supposed to be updated and rendered with the main shape as if they are a group, but they are not regular objects and there's no real group involved. That alone is special enough, and as far as I can see, our code just reflects this. Or am I missing something?
Well, NRArena doesn't know about SVG groups, though. It seems like the best way would be to refactor the NRArenaItem classes so that any item could have children, not just groups.
I actually ended up using a design like that for the canvas in Inkscape Lambda -- it worked out pretty well.
Any-object-with-children is also the direction we evolved in even with SPObject. Originally only SPObjectGroup and SPItemGroup could properly have children, but eventually the having-children stuff got pushed up into SPObject. So I think there's a strong evolutionary pressure in that direction.
-mental
On 11/19/06, MenTaLguY <mental@...3...> wrote:
Well, NRArena doesn't know about SVG groups, though. It seems like the best way would be to refactor the NRArenaItem classes so that any item could have children, not just groups.
Agreed, this sounds sensible.
On Sun, 2006-11-26 at 21:36 +0100, Emanuele Aina wrote:
MenTaLguY presentò:
I actually ended up using a design like that for the canvas in Inkscape Lambda -- it worked out pretty well.
Sorry, but I think I missed something: what is "Inkscape Lambda"? :)
A mini-project where I dabbled with implementing a subset of Inkscape in Haskell. I didn't really get that far.
-mental
MenTaLguY rivelò:
Sorry, but I think I missed something: what is "Inkscape Lambda"? :)
A mini-project where I dabbled with implementing a subset of Inkscape in Haskell. I didn't really get that far.
Seeing your adventures in Haskell on your blog I suspected something similar, but I was not able to find any evidence of it... :)
participants (4)
-
Bryce Harrington
-
bulia byak
-
Emanuele Aina
-
MenTaLguY