Results 1 to 6 of 6

Thread: How do I rotate a QPolygon

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2011
    Location
    Russia
    Posts
    85
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    2
    Thanked 13 Times in 13 Posts

    Default Re: How do I rotate a QPolygon

    painter.rotate( -90 );

  2. #2
    Join Date
    Sep 2011
    Location
    Bangalore
    Posts
    254
    Qt products
    Qt4 Qt5
    Platforms
    Windows
    Thanks
    92
    Thanked 16 Times in 16 Posts

    Default Re: How do I rotate a QPolygon

    Dude, I tried that. But, I want to know the reason why it's taking clockwise, and not the conventional trigonometric way.

  3. #3
    Join Date
    May 2011
    Posts
    239
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60
    Thanks
    4
    Thanked 35 Times in 35 Posts

    Default Re: How do I rotate a QPolygon

    If you want the reason, ask for the reason... You must have checked the documentation which says that rotate "Rotates the coordinate system the given angle clockwise". That is, it rotates the world where the polygons live. When you specify a polygon, you just specify points in the rotated coordinate system, not rotated coordinates. Completely conventional, but not perhaps completely documented.

Similar Threads

  1. Is QPolygon really just a vector of points?
    By taraj in forum Qt Programming
    Replies: 1
    Last Post: 26th October 2011, 23:08
  2. How to use a QPolygon as a Pushbutton?
    By Manish.S in forum Newbie
    Replies: 4
    Last Post: 6th December 2010, 10:57
  3. QPainterPath and QPolygon
    By Muz in forum Qt Programming
    Replies: 0
    Last Post: 18th September 2009, 07:16
  4. What really is a QPolygon...
    By giusepped in forum Qt Programming
    Replies: 11
    Last Post: 14th January 2009, 06:57
  5. QPolygon rotate
    By xgoan in forum Qt Programming
    Replies: 3
    Last Post: 8th May 2007, 11:18

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.