Thread: rotate rectangle and ellipse

  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    115

    rotate rectangle and ellipse

    Hello

    I have made an earlier thread on how to rotate a line. rotate line
    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?

  2. #2
    Registered User
    Join Date
    Feb 2010
    Posts
    115
    Nevermind. I tried to tweak the code from rotating lines and it works.
    But thank you anyway.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to fill an ellipse
    By Ducky in forum Windows Programming
    Replies: 4
    Last Post: 08-30-2008, 09:05 AM
  2. Helping out a friend...
    By rhymewithnothin in forum C Programming
    Replies: 21
    Last Post: 09-15-2005, 08:59 PM