Results 1 to 2 of 2

Thread: Rotating the polygon

  1. #1
    Join Date
    Aug 2008
    Posts
    134
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Rotating the polygon

    Hi,
    I have created a polygon in my Widget. When I increment the angle i am rotating the polygon using QMatrix. While rotation the polygon co-ordinates doesn't change. i.e. i can see rotating polygon in the screen, but the co-ordinates of the polygon variable and co-ordinate of the rotated polygon which appears in the screen is different.
    So my question is how can i get rotated polygon's co-ordinates ???

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Rotating the polygon

    Qt Code:
    1. polygon = matrix.map( polygon );
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Rotating QGraphicsEllipseItem, but keeping its location
    By forrestfsu in forum Qt Programming
    Replies: 2
    Last Post: 9th February 2012, 12:47
  2. Rotating a rectangle about its origin
    By babu198649 in forum Newbie
    Replies: 5
    Last Post: 25th October 2008, 12:24
  3. Creating clipped polygon
    By maverick_pol in forum Qt Programming
    Replies: 10
    Last Post: 27th August 2008, 23:15
  4. Rotating Printing of QGraphicsScene
    By init2null in forum Qt Programming
    Replies: 4
    Last Post: 22nd March 2008, 02:42
  5. Replies: 5
    Last Post: 18th March 2008, 09:44

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.