• Post Reply Bookmark Topic Watch Topic
  • New Topic

Rotation  RSS feed

 
Jigar Gandhi
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have made an applet in which i have made a regular polygon of n sides now i want to rotate this polygon to give it an animating effect.
Can anyone tell me how to go about this??
 
Steven Wall
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used AffineTransform.getRotateInstance() and Area.transform() along with the Timing Framework to achieve animation.
 
Campbell Ritchie
Sheriff
Posts: 55351
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Steven Wall:
I have used AffineTransform.getRotateInstance() and Area.transform() along with the Timing Framework to achieve animation.
Good idea. Probably worthwhile using a duplicate of the Graphics object; there is a method called copy() or create() something similar in the Graphics class which you use instead of clone().
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!