xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject RE: Overlay?
Date Fri, 10 Nov 2006 11:54:10 GMT
Hi Michael,

    I would suggest using either 'getScreenCTM' or 
'getTransformToElement(rootSVGElem)' to 
transform the results of 'getBBox' to your overlay.  You are likely to 
encounter problems if you
try and 'simulate' the behavior of these methods.

"Bishop, Michael W. CONTR J9C880" <Michael.Bishop@je.jfcom.mil> wrote on 
11/09/2006 05:18:14 PM:

> OK, using overlays is providing the desired effect, but my bounding
> boxes I draw can still get misaligned.
> 
> Consider the case where the SVG document or the JSVGCanvas gets resized.
> If I end up with "non document" space between the document and the left
> edge of the JSVGCanvas, the bounding boxes get shifted to the right by
> that same amount.
> 
> I'm applying the view box transform of the JSVGCanvas to the Graphics
> object I use to draw the overlay.
> 
> What I need is to draw bounding boxes around whatever I see, be it
> zoomed, resized, scrolled, etc.  I thought the overlay would be the
> object to solve this issue.
> 
> Michael Bishop
> 
> -----Original Message-----
> From: thomas.deweese@kodak.com [mailto:thomas.deweese@kodak.com] 
> Sent: Friday, October 06, 2006 8:28 PM
> To: batik-users@xmlgraphics.apache.org
> Cc: batik-users@xmlgraphics.apache.org
> Subject: RE: Overlay?
> 
> Hi Michael,
> 
> "Bishop, Michael W. CONTR J9C880" <Michael.Bishop@je.jfcom.mil> wrote on
> 
> 10/06/2006 09:46:30 AM:
> 
> > JSVGCanvas.getOverlays().add(...) is the only way I can come up with
> to
> > add an Overlay to the object.
> 
>    This is it (a bit odd I agree but I didn't write it and it does
> work).
> 
> > -----Original Message-----
> > From: thomas.deweese@kodak.com [mailto:thomas.deweese@kodak.com] 
> > Sent: Friday, October 06, 2006 6:55 AM
> > To: batik-users@xmlgraphics.apache.org
> > Cc: batik-users@xmlgraphics.apache.org
> > Subject: Re: Overlay?
> > 
> > Hi Michael,
> > 
> > "Bishop, Michael W. CONTR J9C880" <Michael.Bishop@je.jfcom.mil> wrote
> on
> > 
> > 10/04/2006 12:57:27 PM:
> > 
> > > Can I get some more information about the overlay in Batik?
> > 
> >    There really isn't much to tell.  Basically an overlay is
> > an object who's 'paint' method is called after the main canvas has
> > drawn it's stuff.  The 'paint' transform has been applied to the
> > Graphics2D but not the 'viewing' transform.
> > 
> > > I want to replace my "glass pane" for outline drawing of bounding 
> > > boxes, "ghosting" of a shape before I render one to the actual 
> > > document, etc.  I've been using a glass pane and aligning it with 
> > > the document has been problematic.  The JSVGScrollPane, resizing 
> > > of the canvas, etc., has been throwing off my glass pane and I think
> 
> > > the overlay can solve my problem.
> > 
> >    This sounds like exactly the sort of thing the Overlay objects are
> > intended for.
> > 
> > > Is there a brief on what this can/can't do for me and if I should 
> > > use it to solve this problem?
> > 
> >    As I said an Overlay is pretty simple it just has one 'paint'
> > method that get's called after the canvas has drawn it's stuff.
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail:
> batik-users-help@xmlgraphics.apache.org
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail:
> batik-users-help@xmlgraphics.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 


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


Mime
View raw message