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

Rectangle painting glitches when using gradient fill

    XMLWordPrintable

Details

    • 24c1173

    Description

      When drawing a Rectangle with gradient fill, the pixel offset is incorrectly drawn when antialiasing (smooth=true) is enabled on the Rectangle. Note that the issue does not apply on rectangles with simple color fills, and the discussion on the mailing list has revealed that the intended behavior is to have sharp edges when smooth=true is enabled even if integer coordinates are specified. (internally this implies that we need to add a .5 offset to the paint engine to avoid averaging the borders)

      A somewhat minimal example to reproduce this:

      Rectangle {
      width: 100
      height: 100
      gradient: Gradient {
      GradientStop

      { position: 0.0; color: "red" }

      GradientStop { position: 1.0; color: "white" }}
      border.color: "black"
      border.width: 1
      radius: 4
      smooth:true
      }

      Attachments

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

        Activity

          People

            martjone Martin Jones (closed Nokia identity) (Inactive)
            bachewii Jens
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes