Is it possible to rotate an imageButton clockwise or counter clockwise based on some angle theta? I have a picture of a dial and would like to rotate it as the user drags it horizontally or vertically.
I’ve tried something like
int x = VolumeOSC1->getX() * cos((double)theta) + VolumeOSC1->getY() * sin((double)theta);
int y = VolumeOSC1->getY() * cos((double)theta) - VolumeOSC1->getX() * sin((double)theta);
juce::Justification *justice = new juce::Justification(36);
VolumeOSC1->setBoundsToFit(x,y,VolumeOSC1->getWidth(), VolumeOSC1->getHeight(),*justice,false);
to try and get the new x and y but its just seems to move the control all over lol