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 & HelpPrograms › Smooth rotation of image
Page Index Toggle Pages: 1
Smooth rotation of image (Read 654 times)
Smooth rotation of image
Nov 7th, 2005, 4:46am
 
This piece of code draws a rotated image, but it's not a smooth render: the image comes out very jagged. What gives?

void draw_rotated(PImage img, float x, float y, float dir)
{
 dir+=PI;
 pushMatrix();
 translate(x,y);
 rotate(-dir);
 img.smooth=true;
 image(img,-img.width/2,-img.height/2);
 popMatrix();
}
Page Index Toggle Pages: 1