re: z-index control and relative coordinates: separated at birth?

Rick <[email protected]> Thu, 7 Jan 2010 11:34:52 -0500
Newsgroups gmane.comp.mozilla.devel.svg
Message-ID <[email protected]>
On Thu, Jan 7, 2010 at 11:21 AM, Chris Lilley <[email protected]> wrote:
> On Thursday, January 7, 2010, 4:50:13 PM, Rick wrote:
>
> R> My current project involves a geographic situation display that zooms
> R> rotates and pans.  I call that the map layer, and everything that is
> R> part of the map is in that group.  Immediately following that I have
> R> the hud, containing my widgets, the hud is 1:1 and lives on top.
>
> Yes, but suppose your widgets are tied to some geographic object (like an infobox or tooltip) which if fixed geographically but moves and pans relative to the hud coordinate system?
>
> Or if you also display moving objects (tracks, ships, planes) in real time and those also need widgets attached to their current position?

Yes (as you probably know) I have symbols and data tags that live in
the map, and there is overhead to looking after them.  But I don't see
any easy way around that, and I'd counsel avoiding it.  Maybe I
haven't been paying attention.  (Likely)

>>> It seems that SVG doesn't let you have it both ways - you can either
>>> have relative coordinates, or you can have control of layers / z-
>>> index, not both at once.
>
> Right.
>
> This is something the SVG WG has been aware of for a while. Two things were added to the SVG 1.2 drafts to fix this.
>
> The first was the ref() transform value, so for example you could specify the width, height, font size of a widget in one coordinate system while describing the anchor of the rectangle by saying "that value over there in another part of the tree".
> http://www.w3.org/TR/2004/WD-SVG12-20041027/rendering.html#transform-ref

That would be very very useful.  Fantastic.  References to geometry
would equally useful: x="#modelElement:x"

> The second thing was Overlaying graphics, a way to say "this is on top of everything".
> http://www.w3.org/TR/2004/WD-SVG12-20041027/painting.html#overlay

This I was aware of, Z Order isn't hard to deal with with a little
architecture, but it would be useful.

> Of those, overlay made it into SVG Tiny 1.2 (but only for the video element)
> http://www.w3.org/TR/SVGTiny12/multimedia.html#compositingBehaviorAttribute
>
> and ref() also made it in
> http://www.w3.org/TR/SVGTiny12/coords.html#transform-ref
>
>
> None of which helps people coding to SVG 1.1 (unless you add a script library to backport the functionality) but I did want to show that the SVG WG is aware of the issue and is trying to address it.
>
>
> --
>  Chris Lilley                    mailto:[email protected]
>  Technical Director, Interaction Domain
>  W3C Graphics Activity Lead
>  Co-Chair, W3C Hypertext CG
>
>



--
Cheers!
Rick



-- 
Cheers!
Rick