Thomas,

Thanks again. Everytime you answer a question for me, I find myself
with a lot more work.<grin/>

>From what you've said, it looks like my best bet is to try (in order):

  1. SVGOMImageElement trick.

  2. Build up composite on the fly.
     - Obvious, but I didn't think of it.

  3. Multiple JSVGCanvas objects.
     - I had thought about not needing to rerender unchanged layers.

With the multiImage idea, I'm not sure if the lazy evaluation will
cause me grief or not, so I'll save it.

I'll try and post what I find for anyone else who runs into this idea.

Later,
G. Wade

Thomas E Deweese wrote:
> 
> >>>>> "GWJ" == G Wade Johnson <[EMAIL PROTECTED]> writes:
> 
> GWJ> I think I know the answer already, but I'm going to ask anyway.
> GWJ> Overview: I have an application where I will need to display
> GWJ> multiple SVG images on top of (or behind) one another. I will
> GWJ> also need to manipulate various elements on various images. The
> GWJ> some of these layers may be invisible until triggered by a user
> GWJ> action.
> 
> GWJ>  1. I can generate the visual effect I want with the <image/> element.
> GWJ>     a. This allows me to load multiple SVG files that I can map to the
> GWJ>        same space.
> GWJ>     b. However, I cannot find a way to "reach into" the SVG in the
> GWJ>        image to manipulate internal elements.
> 
>       This should be doable.  As far as reaching into to sub SVG this
> is a pretty small enhancement to the existing DOM.  The
> BridgeUpdateHandler for the SVGOMImageElement already has a reference
> to the referenced document.  This would of course be a non-standard
> SVG DOM (at least right now).
> 
> GWJ>  2. I have seen the <multiImage/>/<subImageRef/> system. It be able to
> GWJ>     tie loading multiple images depending on zoom.
> GWJ>     a. I assume that I would have the same manipulation problems as
> GWJ>        with the <image/> element.
> 
>       Yes, in fact they would be a bit worse because the way
> multiImage is implemented is 'lazy' so normally not all documents are
> loaded and also there is no 'one document' associated (in fact I'm not
> sure how this would make sense in the context of a central application
> tweaking docs since you would have to 'retweak' documents when
> resolutions changes).
> 
> GWJ>     b. The files are supposed to be viewable by other SVG viewers,
> GWJ>        although the manipulation features are only available in my
> GWJ>        application. I'm not sure how these elements would play with
> GWJ>        other viewers.
> 
>       You can fairly easily use 'switch' and 'requiredExtensions' to
> fall back to a standard image element when needed (i.e. anything but
> Batik :).
> 
> GWJ>  3. There have been a few questions in the past on this list about
> GWJ>     layering JSVGCanvas objects and displaying one on top of another.
> GWJ>     a. I don't know if anyone has ever gotten this approach to
> GWJ>        work.
> 
>       I've never tried it directly but I do know that transparent
> backgrounds work for the JSVGCanvas and this is probably the most
> important piece.
> 
> GWJ>     b. I assume I could just walk a list of documents and manipulate
> GWJ>        all appropriate elements on each document.
> 
>       Sure you would have a list of JSVGCanvas's and you can get the
> document from them.
> 
> GWJ> Does anybody have any other ideas or comments on these ideas?
> 
>       You might consider building the composite document yourself
> (fetch each of the 'sub documents' and build the composite document on
> the client).  This would solve the 'reaching into' issue and allow you
> to only have one JSVGCanvas.
> 
>       One other issue you might not have considered is that by using
> multiple JSVGCanvas's you have the potential advantage that a
> modification in on layer would not require all the layers to re-render
> (the JSVGCanvas maintains an offscreen buffer which all the other
> layers could use).
> 
> GWJ> Thanks, G. Wade
> 
> GWJ> ---------------------------------------------------------------------
> GWJ> To unsubscribe, e-mail: [EMAIL PROTECTED]
> GWJ> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to