Details

    • Technical task
    • Resolution: Fixed
    • P2: Important
    • None
    • None
    • None

    Description

      When triangles containing curves overlap with other triangles, we get into trouble with parts sticking out and the triangulator having trouble because it assumes there are no overlapping triangles. The article mentions that the trick here is to detect when a triangle representing a curve is overlapping with another triangle representing a curve, and then subdividing one of the curves until there are no more overlaps. This should be done on the QPainterPath before we start triangulating it as a pre-pass, so that the QPainterPath we pass in does not contain any curves which will result in overlapping triangles. De Casteljau's algorithm may be useful for subdividing the curves.

      Here's the illustration from the original article:

      The problem is easily visible with the current implementation on the outline. Here is an example from the current implementation:

      When enabling debug view, we can see that the concave triangle (the blue one) is overlapping with the convex triangle (the red one) and the tip representing its control point is sticking out of the shape, causing the sharp edge there.

      Zoomed in:

      Attachments

        1. screenshot-4.png
          screenshot-4.png
          29 kB
        2. screenshot-3.png
          screenshot-3.png
          49 kB
        3. screenshot-2.png
          screenshot-2.png
          37 kB
        4. screenshot-1.png
          screenshot-1.png
          10 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt.team.graphics.and.multimedia Qt Graphics Team
              esabraha Eskil Abrahamsen Blomfeldt
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes