thanks to those that took time out to answer my initial query (the
solution by Andrey -below - was perfect).

But it appears the real problem with the task I need to solve lies in
what type of transformation to use, if at all.

Basically, my application looks for two lines that form a T shape.
Lets call the top half of the shape the hat, which sits on top of the
bottom half, the pole.  My application needs to cater for instances
where these two lines(the hat and the pole) do not intersect.  What I
need to do to rectify this is elongate(transform) the pole in the
direction of the hat such that both lines intersect.  My real problem
is that I'm not sure how to implement this solution in java.  I had
hoped to use the shear transform, but this doesnt produce the desired
effect.  Perhaps because I'm not passing the right parameters...?or
perhaps i'm using the wrong transformation?... or the AffineTransform
class may not even be the right class for what i need to achieve?

please help a desperately over deadline student.

skatz.
------ Forwarded message -------


From: Andrey Krestnikov <[EMAIL PROTECTED]>
Reply-to: [EMAIL PROTECTED]: Aminat Agoro <[EMAIL PROTECTED]>
Date: Mon, 17 Mar 2003 17:28:13 +0300

Hello Aminat,
see AffineTransform doc
/**
     * Returns a new [EMAIL PROTECTED] Shape} object defined by the geometry of
the
     * specified <code>Shape</code> after it has been transformed by
     * this transform.
     * @param pSrc the specified <code>Shape</code> object to be
     * transformed by this transform.
     * @return a new <code>Shape</code> object that defines the
geometry
     * of the transformed <code>Shape</code>.
     */
    public Shape createTransformedShape(Shape pSrc) {...}

Monday, March 17, 2003, 2:41:15 PM, you wrote:

AA> I'm a university student thats new to java, and even newer to
java2D.
AA> What I need to do is transform a Line2D shape and do some
calculations
AA> based on its new coordinates.  From the research i've done thus
far,
AA> it appears that this can only be done within the paint method (or
its
AA> variations).  But I dont necessarily want the transformed shape
drawn
AA> on the canvas, instead I want to test whether the transformed
line2D
AA> intersects another line2D shape that has not been transformed.

AA> if anyone can shed some light on how i go about doing this i will
be
AA> very greatful.

AA> thanks

AA> skatz.

AA>
======================================================================
=====
AA> To unsubscribe, send email to [EMAIL PROTECTED] and include in
the body
AA> of the message "signoff JAVA2D-INTEREST".  For general help, send
email to
AA> [EMAIL PROTECTED] and include in the body of the message
"help".




--
Best regards,
 Andrey                            mailto:[EMAIL PROTECTED]

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to