This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • 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: 53734
127
  • 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().
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!