Graphic rotation strange behaviour


#1

Hi i have a strange behaviour with juce. I want to rotate six strings stored in an stringarray. I do an for loop over the array and the rotation is shown but not like expected. Normaly it shoud rotate every string 60 degrees. but it didnt rotate two of them and i couldn figure out what is wrong. here is the code snippet from the paint function. the DBG shows the right angles and radians. thanks

        for (float i = 0; i < Locations.size(); i++) {

            angle = i * (360.0 / EatLocations.size());

            rads = angle * (float_Pi / 180.0);

            DBG(i << " rads " << rads << " angel " << angle);

            g.addTransform(AffineTransform::identity.rotation(rads));

            g.drawText(EatLocations[i], 50, -10, 100, 30, dontSendNotification, false);

        }

#2

That method is addTransform. It appends the new transform to the current transform, which is clearly not what you're trying to do.


#3

Thank you, that solves my problem.