I'd like to draw an oval, but I'd like to be able to rotate it. I know that I can use canvas.drawOval(...)
and canvas.rotate(...)
. However, I want to just rotate my oval and not the whole canvas; that is, I want to rotate my oval before draw it to the canvas.
I have successfully rotated a rect by manipulating the coordinates before drawing it, but that approach isn't working for me with the oval.
There's canvas.save() and canvas.restore() to serve that purpose - i.e.
canvas.save();
canvas.rotate(90);
canvas.drawOval(....);
canvas.restore();
....//do other drawing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With