Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67330

QPainterPath.intersected() returns a closed path, even if QPainterPath is open

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.6.1
    • Widgets: GraphicsView
    • None
    • OpenSUSE 42.2

      Mathematically, the intersection of a line with a surface is a line.

      But the current behavior of intersected is always to return a surface:

      Returns a path which is the intersection of this path's fill area and p's fill area

      To the very least, an optional parameter should allow to get an open path.

      This would allow to clip an open path inside a rectangle, such as:

      clipped_line = line.intersected(rect)

      Here is a concrete use case, with workarounds, from another user:

      https://stackoverflow.com/q/8759864/3565696

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

            bibr Andreas Aardal Hanssen
            ederag ederag
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes