Skip to main content

[JAVA2D] translate method

1 reply [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Chet Haase

Re-send: the list bounced it a few days ago...

Chet.

Chet Haase wrote:
>
> Eyal,
>
> translate() adds the given translation to the one that exists
> in the Graphics object already. So the new x,y are relative to
> the current translated origin, not the top left corner.
>
> This doesn't affect objects you have already drawn, since it only
> impacts things that you will draw after you set this new state.
>
> Chet.
>
>
> java2d@javadesktop.org wrote:
>
>> Hi All,
>>
>> When I use the Graphics2D.translate(int x, int y) several times in one
>> program, does the new x and y are relative to the old origin or to the
>> top left corner?
>>
>> and what happens if I already have several shapes? does Java2D re
>> locate them according to the new origin?
>>
>> Thank u in advance
>> Eyal
>> [Message sent by forum member 'eyal757' (eyal757)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=217485
>>
>> ===========================================================================
>>
>> To unsubscribe, send email to listserv@java.sun.com and include in the
>> body
>> of the message "signoff JAVA2D-INTEREST". For general help, send
>> email to
>> listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".