The two main problems are that you change the rotation after drawing the image and you don't change the point of origin (around which the rotation takes place). To solve this use translate(width, 0); to move the point of origin to the top-right. Then use rotate(radians(90)); to rotate 90 degrees. Then draw the image to the PGraphics.
↧