translation in Java 2D

Discussion in 'Java' started by me, Apr 7, 2004.

  1. me

    me Guest

    Hello

    I would be very grateful if someone could advise as to how to perform a
    translation (translate(...)) on a Graphics2D object, using the center of
    the graphic object as the rotation point.

    (I ask because the object is rotating, and I've only just today started
    looking at this API).

    Thanks very much

    Regards

    J
    me, Apr 7, 2004
    #1
    1. Advertising

  2. On Wed, 07 Apr 2004 18:27:06 +0100, me wrote:

    > Hello
    >
    > I would be very grateful if someone could advise as to how to perform a
    > translation (translate(...)) on a Graphics2D object, using the center of
    > the graphic object as the rotation point.
    >
    > (I ask because the object is rotating, and I've only just today started
    > looking at this API).
    >
    > Thanks very much
    >
    > Regards
    >
    > J


    Here is the algorithm:

    Translate by -center.x, -center.y
    Rotate by theta radians
    Translate by center.x, center.y

    HTH,
    La'ie Techie
    =?UTF-8?b?TMSByrtpZSBUZWNoaWU=?=, Apr 9, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gyro
    Replies:
    4
    Views:
    429
    Jon Caldwell
    Jan 14, 2005
  2. Paul Rubin
    Replies:
    3
    Views:
    694
    jose isaias cabrera
    Feb 1, 2005
  3. Bill Mill
    Replies:
    0
    Views:
    357
    Bill Mill
    Feb 1, 2005
  4. jose isaias cabrera

    Re: Java Integer.ParseInt translation to python

    jose isaias cabrera, Feb 1, 2005, in forum: Python
    Replies:
    0
    Views:
    565
    jose isaias cabrera
    Feb 1, 2005
  5. jose isaias cabrera

    Re: Java Integer.ParseInt translation to python

    jose isaias cabrera, Feb 9, 2005, in forum: Python
    Replies:
    6
    Views:
    2,389
    comp.lang.java
    Feb 10, 2005
Loading...

Share This Page