42 #include <private/qpainterpath_p.h> 43 #include <private/qpaintbuffer_p.h> 45 #include <private/qfontengine_p.h> 46 #include <private/qemulationpaintengine_p.h> 47 #include <private/qimage_p.h> 49 #include <private/qstatictext_p.h> 50 #include <private/qrawfont_p.h> 60 int tabstops,
int* tabarray,
int tabarraylen,
74 char *glyphLayoutData =
new char[size];
109 return theSignalProxy();
119 : ref(1), engine(0), penWidthAdjustment(0)
120 , calculateBoundingRect(true)
142 const QTransform transform = painter->transform();
158 if (painter->hasClipping())
248 #ifdef QPAINTBUFFER_DEBUG_DRAW 249 qDebug() <<
"QPaintBuffer::draw() --------------------------------";
252 printf(
"Float buffer:");
253 for (
int i=0; i<
d->floats.size(); i++) {
255 printf(
"\n%4d-%4d: ", i, i+9);
257 printf(
"%4.2f ",
d->floats[i]);
261 printf(
"Int Buffer:");
262 for (
int i=0; i<
d->ints.size(); i++) {
264 printf(
"\n%4d-%4d: ", i, i+10);
266 printf(
"%5d",
d->ints[i]);
273 #ifdef QPAINTBUFFER_DEBUG_DRAW 274 qDebug() <<
"QPaintBuffer::draw() -------------------------------- DONE!";
290 if (!painter || !painter->
isActive())
304 for (
int i = begin; i <
end; ++i) {
314 #ifndef QT_NO_DEBUG_STREAM 328 debug <<
"Cmd_Restore";
333 debug <<
"Cmd_SetBrush: " << brush;
342 debug <<
"ExCmd_SetCompositionMode, mode: " << mode;
350 debug <<
"ExCmd_DrawVectorPath: size: " << cmd.
size 357 debug <<
"ExCmd_StrokeVectorPath: size: " << cmd.
size 364 debug <<
"ExCmd_FillVectorPath: size: " << cmd.
size 372 debug <<
"ExCmd_FillRectBrush, offset: " << cmd.
offset <<
" rect: " << *rect <<
" brush: " << brush;
378 debug <<
"ExCmd_FillRectBrush, offset: " << cmd.
offset <<
" rect: " << *rect <<
" color: " << color;
382 debug <<
"ExCmd_DrawPolygonF, offset: " << cmd.
offset <<
" size: " << cmd.
size 383 <<
" mode: " << cmd.
extra 389 debug <<
"ExCmd_DrawPolygonI, offset: " << cmd.
offset <<
" size: " << cmd.
size 390 <<
" mode: " << cmd.
extra 396 debug <<
"ExCmd_DrawEllipseF, offset: " << cmd.
offset;
400 debug <<
"ExCmd_DrawLineF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
404 debug <<
"ExCmd_DrawLineI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
408 debug <<
"ExCmd_DrawPointsF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
412 debug <<
"ExCmd_DrawPointsI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
416 debug <<
"ExCmd_DrawPolylineF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
420 debug <<
"ExCmd_DrawPolylineI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
424 debug <<
"ExCmd_DrawRectF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
428 debug <<
"ExCmd_DrawRectI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
433 debug <<
"ExCmd_SetClipEnabled:" << clipEnabled;
438 debug <<
"ExCmd_ClipVectorPath:" << path().elementCount();
444 debug <<
"ExCmd_ClipRect:" << rect << cmd.
extra;
454 debug <<
"Cmd_SetPen: " << pen;
459 debug <<
"Cmd_SetTransform, offset: " << cmd.
offset << xform;
463 debug <<
"Cmd_SetRenderHints, hints: " << cmd.
extra;
467 debug <<
"Cmd_SetBackgroundMode: " << cmd.
extra;
471 debug <<
"Cmd_DrawConvexPolygonF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
475 debug <<
"Cmd_DrawConvexPolygonI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
479 debug <<
"Cmd_DrawEllipseI, offset: " << cmd.
offset;
489 debug <<
"Cmd_DrawPixmapRect:" << r << sr << pm.
size();
495 debug <<
"Cmd_DrawPixmapPos:" << pos << pm.
size();
504 debug <<
"Cmd_DrawTiledPixmap:" << r << offset << pm.
size();
513 debug <<
"Cmd_DrawImageRect:" << r << sr << image.
size();
519 debug <<
"Cmd_DrawImagePos:" << pos << image.
size();
529 debug <<
"Cmd_DrawText:" << pos << text << font.
family();
538 debug <<
"Cmd_DrawTextItem:" << pos <<
" " <<
text;
543 debug <<
"Cmd_SystemStateChanged:" << systemClip;
547 debug <<
"Cmd_Translate:" << delta;
550 debug <<
"Cmd_DrawStaticText";
592 , m_begin_detected(false)
593 , m_save_detected(false)
594 , m_stream_raw_text_items(false)
602 d->systemStateChanged();
615 #ifdef QPAINTBUFFER_DEBUG_DRAW 616 qDebug() <<
"QPaintBufferEngine: createState, orig=" << orig <<
", current=" <<
state();
633 #ifdef QPAINTBUFFER_DEBUG_DRAW 643 #ifdef QPAINTBUFFER_DEBUG_DRAW 644 qDebug() <<
"QPaintBufferEngine: clip rect:" << rect <<
"op:" << op;
653 #ifdef QPAINTBUFFER_DEBUG_DRAW 654 qDebug() <<
"QPaintBufferEngine: clip region br:" << region.
boundingRect() <<
"op:" << op;
672 #ifdef QPAINTBUFFER_DEBUG_DRAW 685 #ifdef QPAINTBUFFER_DEBUG_DRAW 686 qDebug() <<
"QPaintBufferEngine: penChanged (compressed)" <<
state()->
pen;
697 QPointF transformedWidth(penWidth, penWidth);
703 #ifdef QPAINTBUFFER_DEBUG_DRAW 715 #ifdef QPAINTBUFFER_DEBUG_DRAW 716 qDebug() <<
"QPaintBufferEngine: brushChanged (compressed)" <<
state()->
brush;
722 #ifdef QPAINTBUFFER_DEBUG_DRAW 730 #ifdef QPAINTBUFFER_DEBUG_DRAW 738 #ifdef QPAINTBUFFER_DEBUG_DRAW 746 #ifdef QPAINTBUFFER_DEBUG_DRAW 756 #ifdef QPAINTBUFFER_DEBUG_DRAW 771 bool invertible =
false;
773 delta = transform *
d->last.inverted(&invertible);
781 #ifdef QPAINTBUFFER_DEBUG_DRAW 782 qDebug() <<
"QPaintBufferEngine: transformChanged (translate only) " <<
state()->
matrix;
795 #ifdef QPAINTBUFFER_DEBUG_DRAW 796 qDebug() <<
"QPaintBufferEngine: transformChanged (compressing) " <<
state()->
matrix;
802 #ifdef QPAINTBUFFER_DEBUG_DRAW 810 #ifdef QPAINTBUFFER_DEBUG_DRAW 819 #ifdef QPAINTBUFFER_DEBUG_DRAW 827 if (hasPen || hasBrush)
829 #ifdef QPAINTBUFFER_DEBUG_DRAW 831 qDebug() <<
" - no pen or brush active, discarded...\n";
842 #ifdef QPAINTBUFFER_DEBUG_DRAW 856 #ifdef QPAINTBUFFER_DEBUG_DRAW 870 #ifdef QPAINTBUFFER_DEBUG_DRAW 871 qDebug() <<
"QPaintBufferEngine: fillRect brush:" << rect << brush;
882 #ifdef QPAINTBUFFER_DEBUG_DRAW 883 qDebug() <<
"QPaintBufferEngine: fillRect color:" << rect << color;
894 #ifdef QPAINTBUFFER_DEBUG_DRAW 895 qDebug() <<
"QPaintBufferEngine: drawRectsI:" << rectCount;
899 cmd->
extra = rectCount;
902 if (rectCount == 1) {
905 int min_x = rects[0].left();
906 int min_y = rects[0].top();
907 int max_x = rects[0].left() + rects[0].width();
908 int max_y = rects[0].top() + rects[0].height();
909 for (
int i=1; i< rectCount; ++i) {
910 if (rects[i].
left() < min_x)
911 min_x = rects[i].left();
912 if (rects[i].top() < min_y)
913 min_y = rects[i].top();
914 if (rects[i].
right() > max_x)
915 max_x = rects[i].left() + rects[i].width();
916 if (rects[i].bottom() > max_y)
917 max_y = rects[i].top() + rects[i].height();
927 #ifdef QPAINTBUFFER_DEBUG_DRAW 928 qDebug() <<
"QPaintBufferEngine: drawRectsF:" << rectCount;
932 cmd->
extra = rectCount;
935 if (rectCount == 1) {
938 qreal min_x = rects[0].left();
939 qreal min_y = rects[0].top();
940 qreal max_x = rects[0].right();
941 qreal max_y = rects[0].bottom();
942 for (
int i=1; i< rectCount; ++i) {
943 if (rects[i].
left() < min_x)
944 min_x = rects[i].left();
945 if (rects[i].top() < min_y)
946 min_y = rects[i].top();
947 if (rects[i].
right() > max_x)
948 max_x = rects[i].right();
949 if (rects[i].bottom() > max_y)
950 max_y = rects[i].bottom();
960 #ifdef QPAINTBUFFER_DEBUG_DRAW 961 qDebug() <<
"QPaintBufferEngine: drawLinesI:" << lineCount;
965 cmd->
extra = lineCount;
968 int min_x = lines[0].p1().x();
969 int min_y = lines[0].p1().y();
970 int max_x = lines[0].p2().x();
971 int max_y = lines[0].p2().y();
976 for (
int i=1; i < lineCount; ++i) {
977 int p1_x = lines[i].p1().x();
978 int p1_y = lines[i].p1().y();
979 int p2_x = lines[i].p2().x();
980 int p2_y = lines[i].p2().y();
982 min_x =
qMin(p2_x, min_x);
983 max_x =
qMax(p1_x, max_x);
985 min_x =
qMin(p1_x, min_x);
986 max_x =
qMax(p2_x, max_x);
989 min_y =
qMin(p2_y, min_y);
990 max_y =
qMax(p1_y, max_y);
992 min_y =
qMin(p1_y, min_y);
993 max_y =
qMax(p2_y, max_y);
1002 #ifdef QPAINTBUFFER_DEBUG_DRAW 1003 qDebug() <<
"QPaintBufferEngine: drawLinesF:" << lineCount;
1007 cmd->
extra = lineCount;
1010 qreal min_x = lines[0].p1().x();
1011 qreal min_y = lines[0].p1().y();
1012 qreal max_x = lines[0].p2().x();
1013 qreal max_y = lines[0].p2().y();
1015 qSwap(min_x, max_x);
1017 qSwap(min_y, max_y);
1018 for (
int i=1; i < lineCount; ++i) {
1019 qreal p1_x = lines[i].p1().x();
1020 qreal p1_y = lines[i].p1().y();
1021 qreal p2_x = lines[i].p2().x();
1022 qreal p2_y = lines[i].p2().y();
1024 min_x =
qMin(p2_x, min_x);
1025 max_x =
qMax(p1_x, max_x);
1027 min_x =
qMin(p1_x, min_x);
1028 max_x =
qMax(p2_x, max_x);
1031 min_y =
qMin(p2_y, min_y);
1032 max_y =
qMax(p1_y, max_y);
1034 min_y =
qMin(p1_y, min_y);
1035 max_y =
qMax(p2_y, max_y);
1044 #ifdef QPAINTBUFFER_DEBUG_DRAW 1045 qDebug() <<
"QPaintBufferEngine: drawEllipseF:" << r;
1054 #ifdef QPAINTBUFFER_DEBUG_DRAW 1055 qDebug() <<
"QPaintBufferEngine: drawEllipseI:" << r;
1077 #ifdef QPAINTBUFFER_DEBUG_DRAW 1078 qDebug() <<
"QPaintBufferEngine: drawPointsI: " << pointCount;
1083 int min_x = points[0].x();
1084 int min_y = points[0].y();
1085 int max_x = points[0].x()+1;
1086 int max_y = points[0].y()+1;
1087 for (
int i=1; i<pointCount; ++i) {
1088 int x = points[i].x();
1089 int y = points[i].y();
1090 min_x =
qMin(min_x, x);
1091 min_y =
qMin(min_y, y);
1092 max_x =
qMax(max_x, x+1);
1093 max_y =
qMax(max_y, y+1);
1101 #ifdef QPAINTBUFFER_DEBUG_DRAW 1102 qDebug() <<
"QPaintBufferEngine: drawPointsF: " << pointCount;
1107 qreal min_x = points[0].x();
1108 qreal min_y = points[0].y();
1109 qreal max_x = points[0].x()+1;
1110 qreal max_y = points[0].y()+1;
1111 for (
int i=1; i<pointCount; ++i) {
1112 qreal x = points[i].x();
1113 qreal y = points[i].y();
1114 min_x =
qMin(min_x, x);
1115 min_y =
qMin(min_y, y);
1116 max_x =
qMax(max_x, x+1);
1117 max_y =
qMax(max_y, y+1);
1125 #ifdef QPAINTBUFFER_DEBUG_DRAW 1126 qDebug() <<
"QPaintBufferEngine: drawPolygonI: size:" << count <<
", mode:" << mode;
1130 (
int *) pts, 2 * count, count);
1139 int min_x = pts[0].
x();
1140 int min_y = pts[0].
y();
1141 int max_x = pts[0].
x();
1142 int max_y = pts[0].
y();
1143 for (
int i=1; i<count; ++i) {
1146 min_x =
qMin(min_x, x);
1147 min_y =
qMin(min_y, y);
1148 max_x =
qMax(max_x, x);
1149 max_y =
qMax(max_y, y);
1157 #ifdef QPAINTBUFFER_DEBUG_DRAW 1158 qDebug() <<
"QPaintBufferEngine: drawPolygonF: size:" << count <<
", mode:" << mode;
1162 (
qreal *) pts, 2 * count, count);
1171 qreal min_x = pts[0].
x();
1172 qreal min_y = pts[0].
y();
1173 qreal max_x = pts[0].
x();
1174 qreal max_y = pts[0].
y();
1175 for (
int i=1; i<count; ++i) {
1178 min_x =
qMin(min_x, x);
1179 min_y =
qMin(min_y, y);
1180 max_x =
qMax(max_x, x);
1181 max_y =
qMax(max_y, y);
1189 #ifdef QPAINTBUFFER_DEBUG_DRAW 1190 qDebug() <<
"QPaintBufferEngine: drawPixmap: src/dest rects " << r << sr;
1202 #ifdef QPAINTBUFFER_DEBUG_DRAW 1203 qDebug() <<
"QPaintBufferEngine: drawPixmap: pos:" << pos;
1219 Qt::ImageConversionFlags )
1221 #ifdef QPAINTBUFFER_DEBUG_DRAW 1222 qDebug() <<
"QPaintBufferEngine: drawImage: src/dest rects " << r << sr;
1236 #ifdef QPAINTBUFFER_DEBUG_DRAW 1237 qDebug() <<
"QPaintBufferEngine: drawImage: pos:" << pos;
1249 #ifdef QPAINTBUFFER_DEBUG_DRAW 1250 qDebug() <<
"QPaintBufferEngine: drawTiledPixmap: src rect/offset:" << r << s;
1265 for (
int i=0; i<staticTextItem->
numGlyphs; ++i) {
1275 #ifdef QPAINTBUFFER_DEBUG_DRAW 1276 qDebug() <<
"QPaintBufferEngine: drawTextItem: pos:" << pos << ti.
text();
1283 font.setStrikeOut(
false);
1284 font.setOverline(
false);
1287 qreal justificationWidth = 0;
1314 #ifdef QPAINTBUFFER_DEBUG_DRAW 1315 qDebug() <<
"QPaintBufferEngine: setState: begin, ignoring.";
1319 #ifdef QPAINTBUFFER_DEBUG_DRAW 1320 qDebug() <<
"QPaintBufferEngine: setState: save.";
1325 #ifdef QPAINTBUFFER_DEBUG_DRAW 1326 qDebug() <<
"QPaintBufferEngine: setState: restore.";
1355 case PdmPhysicalDpiX:
1358 case PdmPhysicalDpiY:
1386 for (
int cmdIndex = begin; cmdIndex <
end; ++cmdIndex) {
1394 if (!
d_ptr->commands.isEmpty())
1400 return d_ptr->frames.size() + 1;
1407 #ifdef QPAINTBUFFER_DEBUG_DRAW 1408 qDebug() <<
" -> Cmd_Save";
1414 #ifdef QPAINTBUFFER_DEBUG_DRAW 1415 qDebug() <<
" -> Cmd_Restore";
1422 #ifdef QPAINTBUFFER_DEBUG_DRAW 1423 qDebug() <<
" -> Cmd_SetPen: " << pen;
1430 #ifdef QPAINTBUFFER_DEBUG_DRAW 1431 qDebug() <<
" -> Cmd_SetBrush: " << brush;
1437 #ifdef QPAINTBUFFER_DEBUG_DRAW 1438 qDebug() <<
" -> Cmd_SetBrushOrigin: " <<
d->variants.at(cmd.
offset).toPointF();
1445 #ifdef QPAINTBUFFER_DEBUG_DRAW 1446 qDebug() <<
" -> Cmd_SetTransform, offset: " << cmd.
offset << xform;
1453 #ifdef QPAINTBUFFER_DEBUG_DRAW 1454 qDebug() <<
" -> Cmd_Translate, offset: " << cmd.
offset << delta;
1462 #ifdef QPAINTBUFFER_DEBUG_DRAW
1463 qDebug() <<
" -> Cmd_SetCompositionMode, mode: " << mode;
1469 #ifdef QPAINTBUFFER_DEBUG_DRAW 1470 qDebug() <<
" -> Cmd_SetRenderHints, hints: " << cmd.
extra;
1473 QPainter::RenderHints nh = (QPainter::RenderHints) cmd.
extra;
1474 QPainter::RenderHints xored = ph ^ nh;
1478 painter->
setRenderHint(QPainter::HighQualityAntialiasing, nh & QPainter::HighQualityAntialiasing);
1488 #ifdef QPAINTBUFFER_DEBUG_DRAW 1489 qDebug() <<
" -> Cmd_SetOpacity: " <<
d->variants.at(cmd.
offset).toDouble();
1495 #ifdef QPAINTBUFFER_DEBUG_DRAW 1496 qDebug() <<
" -> Cmd_SetBackgroundMode: " << cmd.
extra;
1502 #ifdef QPAINTBUFFER_DEBUG_DRAW 1503 qDebug() <<
" -> Cmd_DrawVectorPath: size: " << cmd.
size 1513 #ifdef QPAINTBUFFER_DEBUG_DRAW 1514 qDebug() <<
" -> Cmd_StrokeVectorPath: size: " << cmd.
size 1524 #ifdef QPAINTBUFFER_DEBUG_DRAW 1525 qDebug() <<
" -> Cmd_FillVectorPath: size: " << cmd.
size 1534 #ifdef QPAINTBUFFER_DEBUG_DRAW 1535 qDebug() <<
" -> Cmd_DrawPolygonF, offset: " << cmd.
offset <<
" size: " << cmd.
size 1536 <<
" mode: " << cmd.
extra 1538 <<
d->floats.at(cmd.
offset+1);
1546 #ifdef QPAINTBUFFER_DEBUG_DRAW 1547 qDebug() <<
" -> Cmd_DrawPolygonI, offset: " << cmd.
offset <<
" size: " << cmd.
size 1548 <<
" mode: " << cmd.
extra 1558 #ifdef QPAINTBUFFER_DEBUG_DRAW 1559 qDebug() <<
" -> Cmd_DrawPolylineF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1565 #ifdef QPAINTBUFFER_DEBUG_DRAW 1566 qDebug() <<
" -> Cmd_DrawPolylineI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1572 #ifdef QPAINTBUFFER_DEBUG_DRAW 1573 qDebug() <<
" -> Cmd_DrawConvexPolygonF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1579 #ifdef QPAINTBUFFER_DEBUG_DRAW 1580 qDebug() <<
" -> Cmd_DrawConvexPolygonI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1586 #ifdef QPAINTBUFFER_DEBUG_DRAW 1587 qDebug() <<
" -> Cmd_DrawEllipseF, offset: " << cmd.
offset;
1593 #ifdef QPAINTBUFFER_DEBUG_DRAW 1594 qDebug() <<
" -> Cmd_DrawEllipseI, offset: " << cmd.
offset;
1600 #ifdef QPAINTBUFFER_DEBUG_DRAW 1601 qDebug() <<
" -> Cmd_DrawLineF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1607 #ifdef QPAINTBUFFER_DEBUG_DRAW 1608 qDebug() <<
" -> Cmd_DrawLineI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1614 #ifdef QPAINTBUFFER_DEBUG_DRAW 1615 qDebug() <<
" -> Cmd_DrawPointsF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1621 #ifdef QPAINTBUFFER_DEBUG_DRAW 1622 qDebug() <<
" -> Cmd_DrawPointsI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1634 #ifdef QPAINTBUFFER_DEBUG_DRAW 1635 qDebug() <<
" -> Cmd_DrawPixmapRect:" << r << sr;
1643 #ifdef QPAINTBUFFER_DEBUG_DRAW 1644 qDebug() <<
" -> Cmd_DrawPixmapPos:" << pos;
1655 #ifdef QPAINTBUFFER_DEBUG_DRAW 1656 qDebug() <<
" -> Cmd_DrawTiledPixmap:" << r << offset;
1667 #ifdef QPAINTBUFFER_DEBUG_DRAW 1668 qDebug() <<
" -> Cmd_DrawImageRect:" << r << sr;
1676 #ifdef QPAINTBUFFER_DEBUG_DRAW 1677 qDebug() <<
" -> Cmd_DrawImagePos:" << pos;
1683 #ifdef QPAINTBUFFER_DEBUG_DRAW 1684 qDebug() <<
" -> Cmd_DrawRectF, offset: " << cmd.
offset;
1690 #ifdef QPAINTBUFFER_DEBUG_DRAW 1691 qDebug() <<
" -> Cmd_DrawRectI, offset: " << cmd.
offset;
1699 #ifdef QPAINTBUFFER_DEBUG_DRAW 1700 qDebug() <<
" -> Cmd_FillRectBrush, offset: " << cmd.
offset <<
" rect: " << *rect <<
" brush: " << brush;
1708 #ifdef QPAINTBUFFER_DEBUG_DRAW 1709 qDebug() <<
" -> Cmd_FillRectBrush, offset: " << cmd.
offset <<
" rect: " << *rect <<
" color: " << color;
1715 bool clipEnabled =
d->variants.at(cmd.
offset).toBool();
1716 #ifdef QPAINTBUFFER_DEBUG_DRAW 1717 qDebug() <<
" -> Cmd_SetClipEnabled:" << clipEnabled;
1724 #ifdef QPAINTBUFFER_DEBUG_DRAW 1725 qDebug() <<
" -> Cmd_ClipVectorPath:" << path().elementCount();
1734 #ifdef QPAINTBUFFER_DEBUG_DRAW 1735 qDebug() <<
" -> Cmd_ClipRect:" << rect << cmd.
extra;
1742 #ifdef QPAINTBUFFER_DEBUG_DRAW 1748 #if !defined(QT_NO_RAWFONT) 1758 for (
int i=0; i<(variants.
size() - 1) / 2; ++i) {
1759 glyphIndexes.append(variants.
at(i*2 + 1).
toUInt());
1800 font.setStrikeOut(
false);
1801 font.setOverline(
false);
1804 qreal justificationWidth = 0;
1809 #ifdef QPAINTBUFFER_DEBUG_DRAW 1810 qDebug() <<
" -> Cmd_DrawTextItem:" << pos <<
" " <<
text <<
" " << scaleFactor;
1813 if (scaleFactor != 1.0) {
1818 font =
QFont(fnt, &fake);
1823 if (justificationWidth > 0) {
1837 #ifdef QPAINTBUFFER_DEBUG_DRAW 1854 #ifdef QPAINTBUFFER_DEBUG_DRAW 1855 qDebug() <<
" -> ExCmd_SetBrushOrigin: " <<
d->variants.at(cmd.
offset).toPointF();
1857 xengine->state()->brushOrigin =
d->variants.at(cmd.
offset).toPointF();
1858 xengine->brushOriginChanged();
1863 #ifdef QPAINTBUFFER_DEBUG_DRAW
1864 qDebug() <<
" -> ExCmd_SetCompositionMode, mode: " << mode;
1866 xengine->state()->composition_mode = mode;
1867 xengine->compositionModeChanged();
1871 #ifdef QPAINTBUFFER_DEBUG_DRAW 1872 qDebug() <<
" -> ExCmd_SetOpacity: " <<
d->variants.at(cmd.
offset).toDouble();
1874 xengine->state()->opacity =
d->variants.at(cmd.
offset).toDouble();
1875 xengine->opacityChanged();
1879 #ifdef QPAINTBUFFER_DEBUG_DRAW 1880 qDebug() <<
" -> ExCmd_DrawVectorPath: size: " << cmd.
size 1885 xengine->draw(path());
1890 #ifdef QPAINTBUFFER_DEBUG_DRAW 1891 qDebug() <<
" -> ExCmd_StrokeVectorPath: size: " << cmd.
size 1896 xengine->stroke(path(), pen);
1901 #ifdef QPAINTBUFFER_DEBUG_DRAW 1902 qDebug() <<
" -> ExCmd_FillVectorPath: size: " << cmd.
size 1907 xengine->fill(path(), brush);
1913 #ifdef QPAINTBUFFER_DEBUG_DRAW 1914 qDebug() <<
" -> ExCmd_FillRectBrush, offset: " << cmd.
offset <<
" rect: " << *rect <<
" brush: " << brush;
1916 xengine->fillRect(*rect, brush);
1922 #ifdef QPAINTBUFFER_DEBUG_DRAW 1923 qDebug() <<
" -> ExCmd_FillRectBrush, offset: " << cmd.
offset <<
" rect: " << *rect <<
" color: " << color;
1925 xengine->fillRect(*rect, color);
1929 #ifdef QPAINTBUFFER_DEBUG_DRAW 1930 qDebug() <<
" -> ExCmd_DrawPolygonF, offset: " << cmd.
offset <<
" size: " << cmd.
size 1931 <<
" mode: " << cmd.
extra 1933 <<
d->floats.at(cmd.
offset+1);
1940 #ifdef QPAINTBUFFER_DEBUG_DRAW 1941 qDebug() <<
" -> ExCmd_DrawPolygonI, offset: " << cmd.
offset <<
" size: " << cmd.
size 1942 <<
" mode: " << cmd.
extra 1951 #ifdef QPAINTBUFFER_DEBUG_DRAW 1952 qDebug() <<
" -> ExCmd_DrawEllipseF, offset: " << cmd.
offset;
1954 xengine->drawEllipse(*(
QRectF *)(
d->floats.constData() + cmd.
offset));
1958 #ifdef QPAINTBUFFER_DEBUG_DRAW 1959 qDebug() <<
" -> ExCmd_DrawEllipseI, offset: " << cmd.
offset;
1961 xengine->drawEllipse(*(
QRect *)(
d->ints.constData() + cmd.
offset));
1965 #ifdef QPAINTBUFFER_DEBUG_DRAW 1966 qDebug() <<
" -> ExCmd_DrawLineF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1972 #ifdef QPAINTBUFFER_DEBUG_DRAW 1973 qDebug() <<
" -> ExCmd_DrawLineI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1979 #ifdef QPAINTBUFFER_DEBUG_DRAW 1980 qDebug() <<
" -> ExCmd_DrawPointsF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1986 #ifdef QPAINTBUFFER_DEBUG_DRAW 1987 qDebug() <<
" -> ExCmd_DrawPointsI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
1993 #ifdef QPAINTBUFFER_DEBUG_DRAW 1994 qDebug() <<
" -> ExCmd_DrawPolylineF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
2000 #ifdef QPAINTBUFFER_DEBUG_DRAW 2001 qDebug() <<
" -> ExCmd_DrawPolylineI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
2007 #ifdef QPAINTBUFFER_DEBUG_DRAW 2008 qDebug() <<
" -> ExCmd_DrawRectF, offset: " << cmd.
offset <<
" size: " << cmd.
size;
2014 #ifdef QPAINTBUFFER_DEBUG_DRAW 2015 qDebug() <<
" -> ExCmd_DrawRectI, offset: " << cmd.
offset <<
" size: " << cmd.
size;
2017 xengine->drawRects((
QRect *) (
d->ints.constData() + cmd.
offset), cmd.
size);
2021 bool clipEnabled =
d->variants.at(cmd.
offset).toBool();
2022 #ifdef QPAINTBUFFER_DEBUG_DRAW 2023 qDebug() <<
" -> ExCmd_SetClipEnabled:" << clipEnabled;
2025 xengine->state()->clipEnabled = clipEnabled;
2026 xengine->clipEnabledChanged();
2031 #ifdef QPAINTBUFFER_DEBUG_DRAW 2032 qDebug() <<
" -> ExCmd_ClipVectorPath:" << path().elementCount();
2041 #ifdef QPAINTBUFFER_DEBUG_DRAW 2042 qDebug() <<
" -> ExCmd_ClipRect:" << rect << cmd.
extra;
2049 #ifdef QPAINTBUFFER_DEBUG_DRAW 2104 stream <<
id << size;
2113 stream >>
id >> size;
2116 command.
size = size;
2161 return stream << entry.
bits;
2166 return stream >> entry.
bits;
2171 qRegisterMetaType<QPaintBufferCacheEntry>();
2172 qRegisterMetaTypeStreamOperators<QPaintBufferCacheEntry>(
"QPaintBufferCacheEntry");
2173 qRegisterMetaType<QPaintBufferCacheEntryV2>();
2174 qRegisterMetaTypeStreamOperators<QPaintBufferCacheEntryV2>(
"QPaintBufferCacheEntryV2");
2190 for (
int i = 0; i < variants.
size(); ++i) {
2199 if (it != imageKeys.
end()) {
2203 images[images.
size()] = image;
2214 if (it != pixmapKeys.
end()) {
2218 pixmaps[pixmaps.
size()] = pixmap;
2228 stream << buffer.d_ptr->ints;
2229 stream << buffer.d_ptr->floats;
2231 stream << buffer.d_ptr->commands;
2232 stream << buffer.d_ptr->boundingRect;
2233 stream << buffer.d_ptr->frames;
2254 for (
int i = 0; i < variants.
size(); ++i) {
2270 qWarning() <<
"operator<<(QDataStream &stream, QPaintBuffer &buffer): unrecognized cache entry type:" << entry.
flags.
type;
The QVariant class acts like a union for the most common Qt data types.
QPaintBufferResource(FreeFunc f, QObject *parent=0)
void setTransform(const QTransform &transform, bool combine=false)
Sets the world transformation matrix.
void setBackgroundMode(Qt::BGMode mode)
Sets the background mode of the painter to the given mode.
virtual uint flags() const
The QPainter class performs low-level painting on widgets and other paint devices.
The QDebug class provides an output stream for debugging information.
QPaintDevice * device() const
Returns the paint device on which this painter is currently painting, or 0 if the painter is not acti...
The QColor class provides colors based on RGB, HSV or CMYK values.
virtual void drawPath(const QPainterPath &path)
The default implementation ignores the path and does nothing.
QDataStream & operator>>(QDataStream &stream, QPaintBufferCommand &command)
qreal right() const
Returns the x-coordinate of the rectangle's right edge.
QGlyphJustification * justifications
void drawPath(const QPainterPath &path)
Draws the given painter path using the current pen for outline and the current brush for filling...
QImage copy(const QRect &rect=QRect()) const
Returns a sub-area of the image as a new image.
int frameEndIndex(int frame) const
virtual void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)
Reimplement this virtual function to draw the polygon defined by the pointCount first points in point...
virtual void drawImage(const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor)
Reimplement this function to draw the part of the image specified by the sr rectangle in the given re...
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
The QFontMetrics class provides font metrics information.
const QTransform & transform() const
Returns the world transformation matrix.
#define QT_END_NAMESPACE
This macro expands to.
QPaintBufferEngine(QPaintBufferPrivate *buffer)
QPointF toPointF() const
Returns the variant as a QPointF if the variant has type() Point or PointF ; otherwise returns a null...
QPaintBufferPrivate * d_ptr
QSize size() const
Returns the size of the pixmap.
virtual void drawPath(const QPainterPath &path)
The default implementation ignores the path and does nothing.
CompositionMode
Defines the modes supported for digital image compositing.
The QLine class provides a two-dimensional vector using integer precision.
void drawPoints(const QPointF *points, int pointCount)
Draws the first pointCount points in the array points using the current pen's color.
QPainter::RenderHints renderHints
uint calculateBoundingRect
virtual void drawPoints(const QPointF *points, int pointCount)
Draws the first pointCount points in the buffer points.
virtual void drawRects(const QRect *rects, int rectCount)
The default implementation converts the first rectCount rectangles in the buffer rects to a QRectF an...
virtual QPainterState * createState(QPainterState *orig) const
virtual void process(const QPaintBufferCommand &cmd)
void setupTransform(QPainter *painter)
QPainter::CompositionMode composition_mode
#define it(className, varName)
Qt::BrushStyle qbrush_style(const QBrush &b)
QFixedPoint * glyphPositions
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
virtual void compositionModeChanged()
void setUnderline(bool)
If enable is true, sets underline on; otherwise sets underline off.
Q_GUI_EXPORT int qt_defaultDpiY()
int frameStartIndex(int frame) const
Qt::PenStyle style() const
Returns the pen style.
virtual void penChanged()
void setPositions(const QVector< QPointF > &positions)
Sets the positions of the edge of the baseline for each glyph in this set of glyph indexes to positio...
void setClipRect(const QRectF &, Qt::ClipOperation op=Qt::ReplaceClip)
Enables clipping, and sets the clip region to the given rectangle using the given clip operation...
QRectF boundingRect() const
Q_GUI_EXPORT int qt_defaultDpiX()
virtual bool begin(QPaintDevice *device)
Reimplement this function to initialise your paint engine when painting is to start on the paint devi...
The QPointF class defines a point in the plane using floating point precision.
virtual int devType() const
qreal left() const
Returns the x-coordinate of the rectangle's left edge.
void qt_format_text(const QFont &font, const QRectF &_r, int tf, const QTextOption *option, const QString &str, QRectF *brect, int tabstops, int *tabarray, int tabarraylen, QPainter *painter)
static QRawFontPrivate * get(const QRawFont &font)
void restore()
Restores the current painter state (pops a saved state off the stack).
virtual void fill(const QVectorPath &path, const QBrush &brush)
void emitAboutToDestroy(const QPaintBufferPrivate *buffer)
bool toBool() const
Returns the variant as a bool if the variant has type() Bool.
const unsigned short * logClusters
QRect boundingRect() const
Returns the bounding rectangle of this region.
bool isExtended() const
Returns true if the paint engine is a QPaintEngineEx derivative.
static QFontPrivate * get(const QFont &font)
bool ref()
Atomically increments the value of this QAtomicInt.
T & value() const
Returns a modifiable reference to the current item's value.
virtual bool end()
Reimplement this function to finish painting on the current paint device.
The QString class provides a Unicode character string.
void setWidth(qreal w)
Sets the width to the given width.
The QObject class is the base class of all Qt objects.
QString text() const
Returns the text that should be drawn.
#define Q_CONSTRUCTOR_FUNCTION(AFUNC)
The QPen class defines how a QPainter should draw lines and outlines of shapes.
void setBrushOrigin(int x, int y)
Sets the brush's origin to point (x, y).
The QSizeF class defines the size of a two-dimensional object using floating point precision...
The QChar class provides a 16-bit Unicode character.
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
void save()
Saves the current painter state (pushes the state onto a stack).
virtual void brushOriginChanged()
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
qreal x() const
Returns the x-coordinate of this point.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
The QLineF class provides a two-dimensional vector using floating point precision.
int ascent() const
Returns the ascent of the font.
Q_CORE_EXPORT void qDebug(const char *,...)
QPaintBufferPrivate * buffer
int m_stream_raw_text_items
virtual void drawEllipse(const QRectF &r)
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect...
void updateBoundingRect(const QRectF &rect)
void drawText(const QPointF &p, const QString &s)
Draws the given text with the currently defined text direction, beginning at the given position...
void append(const T &t)
Inserts value at the end of the list.
void setRenderHint(RenderHint hint, bool on=true)
Sets the given render hint on the painter if on is true; otherwise clears the render hint...
int addData(const int *data, int count)
QPainter * painter() const
Returns the paint engine's painter.
void drawRects(const QRectF *rects, int rectCount)
Draws the first rectCount of the given rectangles using the current pen and brush.
#define QT_BEGIN_NAMESPACE
This macro expands to.
void drawEllipse(const QRectF &r)
Draws the ellipse defined by the given rectangle.
The QRectF class defines a rectangle in the plane using floating point precision. ...
QVector< QPaintBufferCommand > commands
void systemStateChanged()
virtual void opacityChanged()
bool canConvert(Type t) const
Returns true if the variant's type can be cast to the requested type, t.
virtual void fillRect(const QRectF &rect, const QBrush &brush)
void * value(const QPaintBufferPrivate *key)
void drawLines(const QLineF *lines, int lineCount)
Draws the first lineCount lines in the array lines using the current pen.
void fillPath(const QPainterPath &path, const QBrush &brush)
Fills the given path using the given brush.
virtual void setState(QPainterState *s)
QBrush qpen_brush(const QPen &p)
bool isCosmetic() const
Returns true if the pen is cosmetic; otherwise returns false.
virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s)
Reimplement this function to draw the pixmap in the given rect, starting at the given p...
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
void drawConvexPolygon(const QPointF *points, int pointCount)
Draws the convex polygon defined by the first pointCount points in the array points using the current...
static const QCssKnownValue positions[NumKnownPositionModes - 1]
qreal height() const
Returns the height of the rectangle.
#define Q_GLOBAL_STATIC(TYPE, NAME)
Declares a global static variable with the given type and name.
bool isActive() const
Returns true if begin() has been called and end() has not yet been called; otherwise returns false...
const T & at(int i) const
Returns the item at index position i in the list.
bool deref()
Atomically decrements the value of this QAtomicInt.
void append(const T &t)
Inserts value at the end of the vector.
virtual void stroke(const QVectorPath &path, const QPen &pen)
Q_CORE_EXPORT void qWarning(const char *,...)
qreal ascent() const
Corresponds to the ascent of the piece of text that is drawn.
The QImage class provides a hardware-independent image representation that allows direct access to th...
static const char * data(const QByteArray &arr)
Type
This enum type defines the types of variable that a QVariant can contain.
void drawGlyphRun(const QPointF &position, const QGlyphRun &glyphRun)
Draws the specified glyphs at the given position.
qreal width() const
Returns the width of the rectangle.
RenderFlags renderFlags() const
Returns the render flags used.
QPaintEngine * paintEngine() const
Returns the paint engine that the painter is currently operating on if the painter is active; otherwi...
void drawPolygon(const QPointF *points, int pointCount, Qt::FillRule fillRule=Qt::OddEvenFill)
Draws the polygon defined by the first pointCount points in the array points using the current pen an...
The QRegion class specifies a clip region for a painter.
virtual void setState(QPainterState *s)
QPaintEngine * paintEngine() const
QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
The QGlyphRun class provides direct access to the internal glyphs in a font.
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
qreal descent() const
Corresponds to the descent of the piece of text that is drawn.
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
void setSystemClip(const QRegion &baseClip)
Sets the system clip for this engine.
static int spaceNeededForGlyphLayout(int totalGlyphs)
QPaintBuffer & operator=(const QPaintBuffer &other)
void strokePath(const QPainterPath &path, const QPen &pen)
Draws the outline (strokes) the path path with the pen specified by pen.
void insert(const QPaintBufferPrivate *key, void *value)
virtual void systemStateChanged()
void qSwap(T &value1, T &value2)
const T & at(int i) const
Returns the item at index position i in the vector.
QSize size() const
Returns the size of the image, i.
QFontEngine * engineForScript(int script) const
qreal width() const
Specifies the total width of the text to be drawn.
void processCommands(const QPaintBuffer &buffer, QPainter *painter, int begin, int end)
int metric(PaintDeviceMetric m) const
void drawTiledPixmap(const QRectF &rect, const QPixmap &pm, const QPointF &offset=QPointF())
Draws a tiled pixmap, inside the given rectangle with its origin at the given position.
void remove(const QPaintBufferPrivate *key)
The QBrush class defines the fill pattern of shapes drawn by QPainter.
QScopedPointer< QPaintEnginePrivate > d_ptr
virtual void clip(const QVectorPath &path, Qt::ClipOperation op)
#define Q_DECLARE_PUBLIC(Class)
QPaintBufferEngine * engine
void draw(QPainter *painter, int frame=0) const
int size() const
Returns the number of items in the hash.
void setClipRegion(const QRegion &, Qt::ClipOperation op=Qt::ReplaceClip)
Sets the clip region to the given region using the specified clip operation.
void setCompositionMode(CompositionMode mode)
Sets the composition mode to the given mode.
virtual void drawTextItem(const QPointF &pos, const QTextItem &ti)
This function draws the text item textItem at position p.
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the hash...
The QRawFont class provides access to a single physical instance of a font.
virtual int metric(PaintDeviceMetric m) const
void setClipping(bool enable)
Enables clipping if enable is true, or disables clipping if enable is false.
The QFont class specifies a font used for drawing text.
QTextItemIntCopy(const QTextItem &item)
void * data_ptr(const QTransform &t)
QString family() const
Returns the requested font family name, i.e.
Type type() const
Returns the storage type of the value stored in the variant.
The QPoint class defines a point in the plane using integer precision.
T & last()
Returns a reference to the last item in the vector.
void setBrush(const QBrush &brush)
Sets the painter's brush to the given brush.
The QHash::iterator class provides an STL-style non-const iterator for QHash and QMultiHash.
uint toUInt(bool *ok=0) const
Returns the variant as an unsigned int if the variant has type() UInt , Bool , ByteArray ...
int size() const
Returns the number of items in the list.
virtual QPaintEngine * paintEngine() const
void setPen(const QColor &color)
Sets the painter's pen to have style Qt::SolidLine, width 0 and the specified color.
QString commandDescription(int command) const
qreal widthF() const
Returns the pen width with floating point precision.
if(void) toggleToolbarShown
The QRect class defines a rectangle in the plane using integer precision.
virtual void drawLines(const QLine *lines, int lineCount)
The default implementation converts the first lineCount lines in lines to a QLineF and calls the floa...
iterator begin()
Returns an STL-style iterator pointing to the first item in the hash.
The QTextOption class provides a description of general rich text properties.
T qvariant_cast(const QVariant &)
qint64 cacheKey() const
Returns a number that identifies this QPixmap.
virtual void draw(const QVectorPath &path)
virtual int metric(PaintDeviceMetric metric) const
double toDouble(bool *ok=0) const
Returns the variant as a double if the variant has type() Double , QMetaType::Float ...
int y() const
Returns the y coordinate of this point.
void drawImage(const QRectF &targetRect, const QImage &image, const QRectF &sourceRect, Qt::ImageConversionFlags flags=Qt::AutoColor)
QPainterState * m_created_state
qreal y() const
Returns the y-coordinate of this point.
The QPixmap class is an off-screen image representation that can be used as a paint device...
qreal top() const
Returns the y-coordinate of the rectangle's top edge.
void drawPixmap(const QRectF &targetRect, const QPixmap &pixmap, const QRectF &sourceRect)
Draws the rectangular portion source of the given pixmap into the given target in the paint device...
HB_GlyphAttributes * attributes
virtual void drawStaticTextItem(QStaticTextItem *staticTextItem)
QDataStream & operator<<(QDataStream &stream, const QPaintBufferCommand &command)
QPaintBufferCommand * addCommand(Command command)
The QSize class defines the size of a two-dimensional object using integer point precision.
void setFont(const QFont &f)
Sets the painter's font to the given font.
int processCommands(QPainter *painter, int begin, int end) const
bool isEmpty() const
Returns true if the vector has size 0; otherwise returns false.
The QDataStream class provides serialization of binary data to a QIODevice.
RenderHints renderHints() const
Returns a flag that specifies the rendering hints that are set for this painter.
void setClipPath(const QPainterPath &path, Qt::ClipOperation op=Qt::ReplaceClip)
Enables clipping, and sets the clip path for the painter to the given path, with the clip operation...
const T * constData() const
Returns a const pointer to the data stored in the vector.
virtual void backgroundModeChanged()
virtual void transformChanged()
int x() const
Returns the x coordinate of this point.
iterator find(const Key &key)
Returns an iterator pointing to the item with the key in the hash.
void setOpacity(qreal opacity)
Sets the opacity of the painter to opacity.
qreal bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
The QTextItem class provides all the information required to draw text in a custom paint engine...
bool isEmpty() const
Returns true if the rectangle is empty, otherwise returns false.
T value() const
Returns the stored value converted to the template type T.
virtual void clipEnabledChanged()
static int qRegisterPaintBufferMetaTypes()
static const KeyPair *const end
virtual void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr)
Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r...
Qt::PenStyle qpen_style(const QPen &p)
void drawPolyline(const QPointF *points, int pointCount)
Draws the polyline defined by the first pointCount points in points using the current pen...
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
QRegion systemClip() const
Returns the system clip.
virtual void renderHintsChanged()
int size() const
Returns the number of items in the vector.
QFont font() const
Returns the font that should be used to draw the text.
virtual void process(const QPaintBufferCommand &cmd)
iterator erase(iterator it)
Removes the (key, value) pair associated with the iterator pos from the hash, and returns an iterator...
QVector< QVariant > variants
Q_DECL_CONSTEXPR int qRound(qreal d)
qint64 cacheKey() const
Returns a number that identifies the contents of this QImage object.
static QPaintBufferSignalProxy * instance()
void fillRect(const QRectF &, const QBrush &)
Fills the given rectangle with the brush specified.
void setGlyphIndexes(const QVector< quint32 > &glyphIndexes)
Set the glyph indexes for this QGlyphRun object to glyphIndexes.
static QImage qpaintbuffer_storable_image(const QImage &src)
void setBoundingRect(const QRectF &rect)
virtual void brushChanged()
void setRawFont(const QRawFont &rawFont)
Sets the font specified by rawFont to be the font used to look up the glyph indexes.
virtual void clip(const QVectorPath &path, Qt::ClipOperation op)=0
void translate(const QPointF &offset)
Translates the coordinate system by the given offset; i.e.