[prev in list] [next in list] [prev in thread] [next in thread] 

List:       batik-users
Subject:    Re: animate mouse dragging
From:       thomas.deweese () kodak ! com
Date:       2006-12-19 13:33:40
Message-ID: OF30A5F4CA.6061EC8B-ON85257249.004A6674-85257249.004A7D51 () knotes ! kodak ! com
[Download RAW message or body]

--=_alternative 004A7D4F85257249_=
Content-Type: text/plain; charset="US-ASCII"

Hi V,

vyang <vyang@apt-cafm.com> wrote on 12/18/2006 11:35:26 AM:

> Thanks Thomas, that was what I wanted.  Now is there a way/easier way 
for me
> to not have my rectangle move when I click somewhere else on the canvas. 

> The way I thought about doing this is to check whether the point I click 
is
> inside the retangle if not it won't update the x, y points.  Any
> tips/tricks/ideas would be much appreciated.

   Umm, did you look at Java.awt.geom.Rectangle2D.contains(double x, 
double y)?


> thomas.deweese wrote:
> > 
> > Hi V,
> > 
> > vyang <vyang@apt-cafm.com> wrote on 12/15/2006 11:16:01 AM:
> > 
> >> I don't want the rectangle to be part of the document.  I just want 
this
> >> rectangle to allow the user to set where/what part of the image to 
> > print. 
> >> Is there a way of doing this in JSVGCanvas?
> > 
> >    You can register an instance of 'batik.swing.gvt.Overlay' with
> > the canvas [canvas.getOverlays().add(...)].  This interface has one
> > method 'void paint(Graphics g)' which is called in the paintComponent
> > of the Canvas after it has updated the SVG display.  This is how
> > the various 'interactors' are implemented.
> > 
> >    You might want to review the Batik wiki in particular my
> > 2003 talk at ApacheCON which covers some of this.
> > 
> > 
> 
> -- 
> View this message in context: http://www.nabble.com/animate-mouse-
> dragging-tf2823821.html#a7931907
> Sent from the Batik - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 

--=_alternative 004A7D4F85257249_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi V,</font>
<br>
<br><font size=2><tt>vyang &lt;vyang@apt-cafm.com&gt; wrote on 12/18/2006
11:35:26 AM:<br>
<br>
&gt; Thanks Thomas, that was what I wanted. &nbsp;Now is there a way/easier
way for me<br>
&gt; to not have my rectangle move when I click somewhere else on the canvas.
<br>
&gt; The way I thought about doing this is to check whether the point I
click is<br>
&gt; inside the retangle if not it won't update the x, y points. &nbsp;Any<br>
&gt; tips/tricks/ideas would be much appreciated.<br>
</tt></font>
<br><font size=2><tt>&nbsp; &nbsp;Umm, did you look at Java.awt.geom.Rectangle2D.contains(double
x, double y)?</tt></font>
<br>
<br>
<br><font size=2><tt>&gt; thomas.deweese wrote:<br>
&gt; &gt; <br>
&gt; &gt; Hi V,<br>
&gt; &gt; <br>
&gt; &gt; vyang &lt;vyang@apt-cafm.com&gt; wrote on 12/15/2006 11:16:01
AM:<br>
&gt; &gt; <br>
&gt; &gt;&gt; I don't want the rectangle to be part of the document. &nbsp;I
just want this<br>
&gt; &gt;&gt; rectangle to allow the user to set where/what part of the
image to <br>
&gt; &gt; print. <br>
&gt; &gt;&gt; Is there a way of doing this in JSVGCanvas?<br>
&gt; &gt; <br>
&gt; &gt; &nbsp; &nbsp;You can register an instance of 'batik.swing.gvt.Overlay'
with<br>
&gt; &gt; the canvas [canvas.getOverlays().add(...)]. &nbsp;This interface
has one<br>
&gt; &gt; method 'void paint(Graphics g)' which is called in the paintComponent<br>
&gt; &gt; of the Canvas after it has updated the SVG display. &nbsp;This
is how<br>
&gt; &gt; the various 'interactors' are implemented.<br>
&gt; &gt; <br>
&gt; &gt; &nbsp; &nbsp;You might want to review the Batik wiki in particular
my<br>
&gt; &gt; 2003 talk at ApacheCON which covers some of this.<br>
&gt; &gt; <br>
&gt; &gt; <br>
&gt; <br>
&gt; -- <br>
&gt; View this message in context: http://www.nabble.com/animate-mouse-<br>
&gt; dragging-tf2823821.html#a7931907<br>
&gt; Sent from the Batik - Users mailing list archive at Nabble.com.<br>
&gt; <br>
&gt; <br>
&gt; ---------------------------------------------------------------------<br>
&gt; To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org<br>
&gt; For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org<br>
&gt; <br>
</tt></font>
--=_alternative 004A7D4F85257249_=--
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic