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

Text rotation does not work on WinCE

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 4.8.2
    • GUI: Painting
    • Windows CE 6.0

    Description

      The following code throws an assertion under WinCE:

      void Screen::paintEvent(QPaintEvent*)
      {
          QPainter painter(this);
      
          painter.translate((qreal)100, (qreal)100);
          painter.drawText(20, 20, "Horizontal text");
      
          painter.rotate(-90.0);
      
          painter.drawText(0, 0, "Rotated text");
      }
      

      Note that this used to work with V4.7.2!

      I believe that this is a problem in the following code:

      3439 bool QRasterPaintEngine::supportsTransformations(qreal pixelSize, const QTransform &m) const
      3440 {
      3441 #if defined(Q_WS_MAC) || (defined(Q_OS_MAC) && defined(Q_WS_QPA)) 
      3442     // Mac font engines don't support scaling and rotation
      3443     if (m.type() > QTransform::TxTranslate)
      3444 #else
      3445     if (m.type() >= QTransform::TxProject)
      3446 #endif
      3447         return true;
      3448
      3449     if (pixelSize * pixelSize * qAbs(m.determinant()) >= 64 * 64)
      3450         return true;
      3451
      3452     return false;
      3453 }
      

      adding "|| defined(Q_WS_WINCE)" to line 3441 solves the problem.

      Attachments

        For Gerrit Dashboard: QTBUG-26347
        # Subject Branch Project Status CR V

        Activity

          People

            krf Kevin Funk
            aheld Andreas Held
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes