xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas E Deweese <thomas.dewe...@kodak.com>
Subject Re: Question on overlays
Date Thu, 06 Mar 2003 14:57:07 GMT
>>>>> "SB" == Siarhei Biarozkin <sberyozkin@zandar.com> writes:

SB> Hello, "Underlays" - that's interesting, we'll have a look, thanks
SB> for a useful hint.  Unfortunately, as it currently stands, we
SB> won't be able to use that feature, as the first child of <svg>
SB> element defines an overall background for a user view; 

    If the background is static you could turn that into a
BufferedImage and make this the first underlay then your grid could be
the second underlay (just like overlays they underlays could be
ordered).  Depending on the complexity of the background doing it this
way may also improve rendering performance.

SB> a user can interactively select new backgrounds which are svg
SB> templates in itself, as a result that new svg fragment will become
SB> the first child, etc, so to do the grid, we'll need to insert a
SB> grid group just before real DOM data start...  

SB> Perhaps, If it were possible to insert layers between the DOM tree
SB> nodes , then we could use overlays, but this seems to be an
SB> overkill :-) 

    Yes, this would be pretty hairy, at this point you are really
better off just working with the DOM.

----- Original Message -----
SB> From: "Thomas E Deweese" <thomas.deweese@kodak.com> To: "Batik
SB> Users" <batik-users@xml.apache.org> Sent: Thursday, March 06, 2003
SB> 2:30 PM Subject: Re: Question on overlays


>> >>>>> "SB" == Siarhei Biarozkin <sberyozkin@zandar.com> writes:
>> 
SB> We're using a JSvgCanvas subclass, originally, we thought we'd the
SB> grid in paintComponent(), however the following caused us to
SB> change that decision : - with ACTIVE_DYNAMIC state
SB> paintComponent() is called very frequently - the DOM document
SB> contains a custom group, as the first child of the svg doc
SB> element, which is the overall background - while I'm writing this
SB> I suddenly realize that the only solution for us is to insert a
SB> grid group into DOM, as a second child, between the background
SB> group and the remaining children
>>  You could also easily add underlays to the JGVTComponent.  This
>> doesn't address the 'paint alot' issue but I don't see how putting
>> it in the DOM helps that either :)
>> 
SB> Cheers Sergey Beryozkin
>>
SB> ----- Original Message ----- From: "Thierry Kormann"
SB> <tkormann@ilog.fr> To: "Batik Users" <batik-users@xml.apache.org>
SB> Sent: Thursday, March 06, 2003 12:52 PM Subject: RE: Question on
SB> overlays
>> 
>> 
>> >> > I understand it's not part of the DOM, > To rephrase the >>
>> question : > assuming we have an overlay registered with the >>
>> canvas, what will be
SB> drawn
>> >> > first : a containing SVG document or whatever the overlay
>> object >> > draws ? We > need our grid be located "under" the DOM
>> doc, if >> overlay is asked to
SB> paint
>> >> > itself after the DOM has already been drawn, it's then not
>> going >> > to work for > us, and the only solution would be to
>> insert a grid >> group into the DOM
SB> as
>> >> > the first child of the svg root.  > However, semantically, the
>> >> grid is really not part of the data the DOM > represents in our
>> >> case
>> >>
>> >> my recommendation would be to subclass the JSVGCanvas and
>> override >> the
SB> paint
>> >> methods in order to draw the grid first.
>> >>
>> >> Thierry.
>> >>
>> >>
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
>> For >> additional commands, e-mail: batik-users-help@xml.apache.org
>> >>
>> >>
>> >>
>> 
>> 
SB> ---------------------------------------------------------------------
SB> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org For
SB> additional commands, e-mail: batik-users-help@xml.apache.org
>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org For
>> additional commands, e-mail: batik-users-help@xml.apache.org
>> 
>> 
>> 


SB> ---------------------------------------------------------------------
SB> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org For
SB> additional commands, e-mail: batik-users-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org


Mime
View raw message