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

Transparent rectangle is drawn with one pixel offset

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.2
    • 4.7.1
    • (Inactive) OpenVG
    • None
    • 0df002ad600800a6c4ccadb969e1b1de7f8353e7

    Description

      Open attached example (file openvg_transparentrectangle_bug.qml) with qmlviewer running on N8. The example contains two rectangles on top of each other: one partially transparent black rectangle on top of a white opaque rectangle. The upper black rectangle should cover the lower white rectangle fully, but when using OpenVG paint engine one vertical, thin, white, one pixel line is left unpainted on the left border of the rectangle (see attached screenshot openvg_transparent_rect_bug.png).

      The bug only occurs when the upper rectangle is not opaque. If you remove the opacity assignment "opacity: 0.3" the 1 pixel offset bug no longer occurs.

      QDeclarativeRectangle (src/declarative/graphicsitems/qdeclarativerectangle.cpp) paints the rectangle using QPainter function QPainter::fillRect(QRectF&, QColor&): p->fillRect(QRectF(0, 0, width(), height()), d->color);

      Tested on top of Qt 4.7 branch sha 6018c6138018eb322ccdc8f34516e77ee43ed83d.

      Attachments

        1. openvg_transparent_rect_bug.png
          1 kB
          Joona Petrell
        2. openvg_transparent_rect_bug.qml
          0.3 kB
          Joona Petrell

        Issue Links

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

          Activity

            People

              jabarron Jason Barron
              jpetrell Joona Petrell
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes