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

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

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes