rotate rectangle and ellipse

This is a discussion on rotate rectangle and ellipse within the C Programming forums, part of the General Programming Boards category; Hello 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 ...

  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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21