Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Problem with rotating text (Qt 4.8.2, WinCE6)
Forum Updated to NodeBB v4.3 + New Features

Problem with rotating text (Qt 4.8.2, WinCE6)

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 2.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aheld
    wrote on last edited by
    #1

    Hi

    We are using QPainter::rotate to rotate some text on the screen using the following code:

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

    This worked perfectly well under Qt4.7.2 but does not work anymore under Qt4.8.2 for WinCE 6.0. The debug version throws now an assert, while the release version simply lines up the text vertically, without rotating the glyphs. If we run the same test program under Win32, everything works as expected.
    Didi anybody else observe such a behaviour? Any idea what went wrong here?

    Best regards

    Andreas

    1 Reply Last reply
    0
    • E Offline
      E Offline
      ErikH
      wrote on last edited by
      #2

      Hi Andreas,

      Did you find any solution to this problem?

      I just ran into the same problem. I try to write vertical text in qml and got the same assert in qfontengine_win.cpp. (I run win ce 6 and qt 4.8.2.)

      Regards,
      Erik

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aheld
        wrote on last edited by
        #3

        Hi Erik

        I have added bug QTBUG-26347 to the issue tracker. Basically, the work-around is as follows:
        There 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.

        Best regards

        Andreas

        1 Reply Last reply
        0
        • E Offline
          E Offline
          ErikH
          wrote on last edited by
          #4

          Thank you!

          It worked fine.

          Best regards,
          Erik

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved