Results 1 to 3 of 3

Thread: QPainterPath horizontal flip

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default QPainterPath horizontal flip

    Hello,

    I'd like to flip horizontaly a QPainterPath.
    Is is possible with a QMatrix ?

    Thanks.

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPainterPath horizontal flip

    Yes, but you must apply it on the painter, not on the painter path.
    But you can also use QPainter::rotate and scale.
    But:
    Qt Code:
    1. m.scale(-1.0, -1.0);
    2. painter.setMatrix(m);
    3. //draw the painter path
    To copy to clipboard, switch view to plain text mode 
    Last edited by marcel; 28th October 2007 at 20:17.

  3. The following user says thank you to marcel for this useful post:

    bunjee (28th October 2007)

  4. #3
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: QPainterPath horizontal flip

    Thank you,

    That should do the job.

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.