Java2D scale help

Hi,
    How come when I use g2d.scale(x,y), it moves my object to another location? How do I bring it back to the original location? thanks!
azcalv408Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
objectsConnect With a Mentor Commented:
because the scaling is relative to 0,0
you nned to 1st translate it so it is centred around origin, scale it, then translate it back.
0
 
azcalv408Author Commented:
sorry for late reply...do you think this is the same for rotation and shear? thanks
0
 
SamsonChungCommented:
YES

Think about X,Y coordinates......

start point, end pt, you will have to translate it back and forth with formulars......
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.