Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved clockwise/counter-clockwise drawing would influence the fill rule in shape()?

    General and Desktop
    qt4 fill polygon windingfill qpainterpath
    1
    1
    568
    Loading More Posts
    • 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.
    • H
      helloworld12345 last edited by helloworld12345

      In my shape(), I created a QPainterPath(), set the fill rule to Qt.WindingFill, add one large polygon and multiple ellipses around the points. Like picture below.

      1. If I draw the polygon clockwise, everything is good, I can move the whole combined graphics by dragging either inside polygon or red ellipse.
      2. However I draw the polygon counter-clockwise, I CAN NOT move the combined graphics if I drag the intersection part of ellipses and polygon, they are pointed out by black lines below.
        How would clockwise/counter-clockwise drawing make this difference? How do I fix the issue in counter-clockwise case? I appreciate your help.

      0_1502229401775_polygon.png

      1 Reply Last reply Reply Quote 0
      • First post
        Last post