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

QPainter: antialiasing forces lighter horizontal/vertical straight line color

    XMLWordPrintable

Details

    Description

      When painting simple straight vertical (or horizontal lines) 1px in width using the render hint QPainter::Antialiasing the pen color doesn't necessarily get used as it is at all. Only a much lighter variant of it. So for example if painter pen color is set to Qt::red which is documented as "Red (#ff0000)" the line may end up drawn 2px in width and completely in #ff7f7f which is clearly lighter color.

      The expectation for the output would be that half of the drawn line would be in the selected color (#ff0000) in this case.

      Steps to reproduce the problem:

      1. run the attached project and check the colors of the lines (antialiasing enabled)

      NOTE: To compare the result without antialiasing pass "-no-antialiasing" to the executable.

      Attachments

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

        Activity

          People

            vgt Eirik Aavitsland
            miikapernu Miika Pernu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes