I have made an earlier thread on how to rotate a line. http://cboard.cprogramming.com/c-pro...tate-line.html
Now i want to do exactly the same but for a rectangle and ellipse.
I am using GTK and C.
I need to make a program like paint. I have a linked list where i keep all my objects that i have ever drawn. These objects are rectangles and ellipses. From every object I keep the begin-coordinates and end-coordinates. If I press a button rotate, I want to rotate these objects 90 degrees. But is there some kind of mathematical function or some on how to rotate rectangles and ellipses? Or what is the best way to do this?