xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julo.chro...@hiro.sk
Subject Transforming GraphicsNode
Date Thu, 01 Jun 2006 16:40:32 GMT
Hi,

I have one problem. I am painting GraphicsNode instance into a JFrame
calling it's paint method. This drawing works great.

Then I need to determine if a particular point is contained in
GraphicsNode instance (for example a mouse position after mouse click). So
I use the contain method of my GraphicsNode instance. And this is the
problem. First time I use contains method it works correctly. But then I
translate the GraphicsNode instance using
AffineTransform.getTranslateInstance(tx, ty) and node's setTransform
method. After the translation the node is painted into new position but
the contains method returns true only for the points in original position.
I don't understand why.

Can any one help me? I need to transform the GraphicsNode instances in a
way that the contains method will return true for points in new positions.

If my email is too complicated I can write down little example.

Thanks a lot
  Julo Chrobak


---------------------------------------------------------------------
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