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

Canvas render issues when size is smaller than 64x64

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.9.2
    • None
    • Windows 10 / 8.1 x64 with Qt 5.9.2

      Hi,

      we found that if the width or height of a Canvas component is smaller than 64 (magic number?), then things we painted will get scaled.

      This issue only occurs when renderStrategy is set to Canvas.Cooperative and renderTarget is set to Canvas.FramebufferObject.

      Here's a minimum example to reproduce this issue:

      import QtQuick 2.6
      import QtQuick.Window 2.2
      
      Window {
          visible: true
          width: 32
          height: 32
      
          Canvas {
              anchors.fill: parent
      
              renderStrategy: Canvas.Cooperative
              renderTarget: Canvas.FramebufferObject
      
              onPaint: {
                  var ctx = getContext("2d");
                  ctx.fillRect(0, 0, width, height);
              }
          }
      }
      

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            gpbeta Joshua GPBeta
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes