Rotating Components


#1

I’m currently making a tetris game and am wondering if there is a simple solution to rotating a component.

I have successfully figured out how to rotate the tetris pieces, however this requires me to re paint the current component each time it rotates. This method does work and i am happy with it however if there is way to rotate a component by a certain amount of degrees (90, 180 and 270) that would be really useful to me

I have read some solutions on this forum but i could not make sense of them, any help would be greatly appreciated :slight_smile:


#2

Would https://www.juce.com/doc/classAffineTransform work?

Check out rotation.