Results 1 to 3 of 3

Thread: how to draw area

  1. #1
    Join Date
    May 2013
    Posts
    45
    Thanks
    11
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default how to draw area

    hi. how can i draw into painter this area as on picture? picture is an examples. black it is point and radius (i know only this), white is transparent, and red is filling with hatch.

    area.jpg

    i haven't idea how can i join drawArc and drawPolygon and fill them with a hole, maybe with drawPath
    Last edited by stevocz; 23rd May 2013 at 12:49.

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: how to draw area

    Yes you have to use QPainterPath and QPainter::drawPath.

    Refer example: Painter Paths Example
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. #3
    Join Date
    May 2013
    Posts
    45
    Thanks
    11
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: how to draw area

    thanks path works ok.

    but how can i check which points is in red area?
    Last edited by stevocz; 29th May 2013 at 13:03.

Similar Threads

  1. Replies: 3
    Last Post: 14th February 2012, 12:37
  2. Scroll bars in scroll area not comming in scroll area
    By aurora in forum Qt Programming
    Replies: 3
    Last Post: 4th January 2012, 06:50
  3. Replies: 1
    Last Post: 8th October 2011, 19:15
  4. Replies: 10
    Last Post: 10th February 2011, 23:31
  5. select a particular area
    By vishesh in forum Qt Programming
    Replies: 4
    Last Post: 28th February 2007, 21:44

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