We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Rotating a loaded graphic
Page Index Toggle Pages: 1
Rotating a loaded graphic (Read 943 times)
Rotating a loaded graphic
Apr 30th, 2005, 12:19am
 
Is there a way to rotate a loaded graphic?
(e.g. a gif). I'm not sure how to proceed with PImage objects.

I'm not concerned about the quality of the graphic after rotation but I would like to rotate an actual graphic as apposed to drawing an object at different angles.

The purpose is for a game/test I wanted to try where I rotate Space Ship graphics to represent a numerical direction.
Re: Rotating a loaded graphic
Reply #1 - May 1st, 2005, 11:10pm
 
Oh no worries. I figured it out.

You can use rotateZ, or just rotate but you also need to use pushMatrix() and popMatrix() to make sure you can adjust the coordinate system properly.

You can see a working example of me using image rotation at my webpage:

Space Battle a1
http://mkv25.net/?item_id=98
Page Index Toggle Pages: 1