Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. create polygon from list of points
Qt 6.11 is out! See what's new in the release blog

create polygon from list of points

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 733 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ranshalit
    wrote on last edited by
    #1

    Hello,

    I need to create a polygon (which can be filled) , from a list of points.
    I see in https://forum.qt.io/topic/62142/qpainterpath-from-list-of-points that this my problem might already have a simple solution in Qt by using QPainterPathStroker .

    I haven't tried it yet, but would first like to ask: Does the order of points matters here ?

    Thank you!
    Ran

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Yes, the order of points in a path matters. Imagine 4 points of a rectangle. depending on the order you connect them in you'll get either a rectangle or an hourglass. How such intersecting geometry fills depends then on the fill rule of the path.

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved