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

[REG 5.8->5.9] QPainter::setCompositionMode causes error "blend_src_generic_rgb64 - blend_src_generic_rgb64: unsupported 64-bit blend attempted"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.10.0 Alpha
    • 5.9.0 Beta 3
    • GUI: Painting
    • None

    Description

      This code is in our tablet example qtbase/examples/widgets/widgets/tablet/tabletcanvas.cpp lines 300-316, to show a colored, rotating cursor in real time while a rotatable stylus is hovering over the Wacom tablet:

                      QImage origImg(QLatin1String(":/images/cursor-felt-marker.png"));
                      QImage img(32, 32, QImage::Format_ARGB32);
                      QColor solid = m_color;
                      solid.setAlpha(255);
                      img.fill(solid);
                      QPainter painter(&img);
                      QTransform transform = painter.transform();
                      transform.translate(16, 16);
                      transform.rotate(-event->rotation());
                      painter.setTransform(transform);
                      painter.setCompositionMode(QPainter::CompositionMode_DestinationIn);
                      painter.drawImage(-24, -24, origImg);
                      painter.setCompositionMode(QPainter::CompositionMode_HardLight);
                      painter.drawImage(-24, -24, origImg);
                      painter.end();
                      cursor = QCursor(QPixmap::fromImage(img), 16, 16);
      

      I wrote it a few versions ago; it has been OK until now. (It was the first time I ever used composition modes though. And now it seems to cause this error:

      blend_src_generic_rgb64 - blend_src_generic_rgb64: unsupported 64-bit blend attempted

      Commenting out the setCompositionMode lines and just drawing the image once avoids the error.

      Attachments

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

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes