tests/auto/qstatictext/tst_qstatictext.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
child 37 758a864f9613
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
   322     QPainter p(&pm);
   322     QPainter p(&pm);
   323     QPaintEngine *engine = p.paintEngine();
   323     QPaintEngine *engine = p.paintEngine();
   324 
   324 
   325     QPaintEngine::Type type = engine->type();
   325     QPaintEngine::Type type = engine->type();
   326 
   326 
   327     if (type == QPaintEngine::OpenGL2
   327     if (type == QPaintEngine::OpenGL
   328         || type == QPaintEngine::OpenGL
       
   329 #if !defined Q_WS_WIN
   328 #if !defined Q_WS_WIN
   330         || type == QPaintEngine::Raster
   329         || type == QPaintEngine::Raster
   331 #endif
   330 #endif
   332         )
   331         )
   333         return false;
   332         return false;
   469         p.rotate(33.0);
   468         p.rotate(33.0);
   470         p.scale(0.5, 0.7);
   469         p.scale(0.5, 0.7);
   471 
   470 
   472         p.drawText(QRectF(0, 0, 1000, 1000), 0, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
   471         p.drawText(QRectF(0, 0, 1000, 1000), 0, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
   473 
   472 
   474         p.scale(7.0, 5.0);
   473         p.scale(2.0, 2.5);
   475         p.drawText(QRectF(0, 0, 1000, 1000), 0, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
   474         p.drawText(QRectF(0, 0, 1000, 1000), 0, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
   476     }
   475     }
   477 
   476 
   478     QPixmap imageDrawStaticText(1000, 1000);
   477     QPixmap imageDrawStaticText(1000, 1000);
   479     imageDrawStaticText.fill(Qt::white);
   478     imageDrawStaticText.fill(Qt::white);
   485         QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
   484         QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
   486         text.setTextFormat(Qt::PlainText);
   485         text.setTextFormat(Qt::PlainText);
   487 
   486 
   488         p.drawStaticText(QPointF(0, 0), text);
   487         p.drawStaticText(QPointF(0, 0), text);
   489 
   488 
   490         p.scale(7.0, 5.0);
   489         p.scale(2.0, 2.5);
   491         p.drawStaticText(QPointF(0, 0), text);
   490         p.drawStaticText(QPointF(0, 0), text);
   492     }
   491     }
   493 
   492 
   494 #if defined(DEBUG_SAVE_IMAGE)
   493 #if defined(DEBUG_SAVE_IMAGE)
   495     imageDrawText.save("transformationChanged_imageDrawText.png");
   494     imageDrawText.save("transformationChanged_imageDrawText.png");