qpaintengine.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/painting/qpaintengine.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4qreal QTextItem::descent() const-
5{-
6 const QTextItemInt *ti = static_cast<const QTextItemInt *>(this);-
7 return
never executed: return ti->descent.toReal();
ti->descent.toReal();
never executed: return ti->descent.toReal();
0
8}-
9-
10-
11-
12-
13-
14-
15qreal QTextItem::ascent() const-
16{-
17 const QTextItemInt *ti = static_cast<const QTextItemInt *>(this);-
18 return
never executed: return ti->ascent.toReal();
ti->ascent.toReal();
never executed: return ti->ascent.toReal();
0
19}-
20-
21-
22-
23-
24-
25-
26qreal QTextItem::width() const-
27{-
28 const QTextItemInt *ti = static_cast<const QTextItemInt *>(this);-
29 return
never executed: return ti->width.toReal();
ti->width.toReal();
never executed: return ti->width.toReal();
0
30}-
31-
32-
33-
34-
35-
36-
37QTextItem::RenderFlags QTextItem::renderFlags() const-
38{-
39 const QTextItemInt *ti = static_cast<const QTextItemInt *>(this);-
40 return
never executed: return ti->flags;
ti->flags;
never executed: return ti->flags;
0
41}-
42-
43-
44-
45-
46-
47-
48QString QTextItem::text() const-
49{-
50 const QTextItemInt *ti = static_cast<const QTextItemInt *>(this);-
51 return
never executed: return QString(ti->chars, ti->num_chars);
QString(ti->chars, ti->num_chars);
never executed: return QString(ti->chars, ti->num_chars);
0
52}-
53-
54-
55-
56-
57-
58-
59QFont QTextItem::font() const-
60{-
61 const QTextItemInt *ti = static_cast<const QTextItemInt *>(this);-
62 return
never executed: return ti->f ? *ti->f : QGuiApplication::font();
ti->f ? *ti->f : QGuiApplication::font();
never executed: return ti->f ? *ti->f : QGuiApplication::font();
0
63}-
64void QPaintEngine::syncState()-
65{-
66 ((!(state)) ? qt_assert("state",__FILE__,301) : qt_noop());-
67 updateState(*state);-
68-
69 if (isExtended()
isExtended()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
70 static_cast<
never executed: static_cast<QPaintEngineEx *>(this)->sync();
QPaintEngineEx *>(this)->sync();
never executed: static_cast<QPaintEngineEx *>(this)->sync();
0
71}
never executed: end of block
0
72-
73static QPaintEngine *qt_polygon_recursion = 0;-
74struct QT_Point {-
75 int x;-
76 int y;-
77};-
78template<> class QTypeInfo<QT_Point > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isRelocatable = !isStatic || ((Q_PRIMITIVE_TYPE) & Q_RELOCATABLE_TYPE), isLarge = (sizeof(QT_Point)>sizeof(void*)), isPointer = false, isIntegral = QtPrivate::is_integral< QT_Point >::value, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0), sizeOf = sizeof(QT_Point) }; static inline const char *name() { return "QT_Point"; } };-
79void QPaintEngine::drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode)-
80{-
81 ((!(qt_polygon_recursion != this)) ? qt_assert_x("QPaintEngine::drawPolygon", "At least one drawPolygon function must be implemented",-
82 __FILE__-
83 ,-
84 328-
85 ) : qt_noop())-
86 ;-
87 qt_polygon_recursion = this;-
88 ((!(sizeof(QT_Point) == sizeof(QPoint))) ? qt_assert("sizeof(QT_Point) == sizeof(QPoint)",__FILE__,330) : qt_noop());-
89 QVarLengthArray<QT_Point> p(pointCount);-
90 for (int i = 0; i < pointCount
i < pointCountDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
91 p[i].x = qRound(points[i].x());-
92 p[i].y = qRound(points[i].y());-
93 }
never executed: end of block
0
94 drawPolygon((QPoint *)p.data(), pointCount, mode);-
95 qt_polygon_recursion = 0;-
96}
never executed: end of block
0
97-
98struct QT_PointF {-
99 qreal x;-
100 qreal y;-
101};-
102template<> class QTypeInfo<QT_PointF > { public: enum { isComplex = (((Q_PRIMITIVE_TYPE) & Q_PRIMITIVE_TYPE) == 0), isStatic = (((Q_PRIMITIVE_TYPE) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), isRelocatable = !isStatic || ((Q_PRIMITIVE_TYPE) & Q_RELOCATABLE_TYPE), isLarge = (sizeof(QT_PointF)>sizeof(void*)), isPointer = false, isIntegral = QtPrivate::is_integral< QT_PointF >::value, isDummy = (((Q_PRIMITIVE_TYPE) & Q_DUMMY_TYPE) != 0), sizeOf = sizeof(QT_PointF) }; static inline const char *name() { return "QT_PointF"; } };-
103void QPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDrawMode mode)-
104{-
105 ((!(qt_polygon_recursion != this)) ? qt_assert_x("QPaintEngine::drawPolygon", "At least one drawPolygon function must be implemented",-
106 __FILE__-
107 ,-
108 357-
109 ) : qt_noop())-
110 ;-
111 qt_polygon_recursion = this;-
112 ((!(sizeof(QT_PointF) == sizeof(QPointF))) ? qt_assert("sizeof(QT_PointF) == sizeof(QPointF)",__FILE__,359) : qt_noop());-
113 QVarLengthArray<QT_PointF> p(pointCount);-
114 for (int i=0; i<pointCount
i<pointCountDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
115 p[i].x = points[i].x();-
116 p[i].y = points[i].y();-
117 }
never executed: end of block
0
118 drawPolygon((QPointF *)p.data(), pointCount, mode);-
119 qt_polygon_recursion = 0;-
120}
never executed: end of block
0
121void QPaintEngine::drawPoints(const QPointF *points, int pointCount)-
122{-
123 QPainter *p = painter();-
124 if (!p
!pDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
125 return;
never executed: return;
0
126-
127 qreal penWidth = p->pen().widthF();-
128 if (penWidth == 0
penWidth == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
129 penWidth = 1;
never executed: penWidth = 1;
0
130-
131 bool ellipses = p->pen().capStyle() == Qt::RoundCap;-
132-
133 p->save();-
134-
135 QTransform transform;-
136 if (qt_pen_is_cosmetic(p->pen(), p->renderHints())
qt_pen_is_cosm...renderHints())Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
137 transform = p->transform();-
138 p->setTransform(QTransform());-
139 }
never executed: end of block
0
140-
141 p->setBrush(p->pen().brush());-
142 p->setPen(Qt::NoPen);-
143-
144 for (int i=0; i<pointCount
i<pointCountDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
145 QPointF pos = transform.map(points[i]);-
146 QRectF rect(pos.x() - penWidth / 2, pos.y() - penWidth / 2, penWidth, penWidth);-
147-
148 if (ellipses
ellipsesDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
149 p->drawEllipse(rect);
never executed: p->drawEllipse(rect);
0
150 else-
151 p->drawRect(rect);
never executed: p->drawRect(rect);
0
152 }-
153-
154 p->restore();-
155}
never executed: end of block
0
156void QPaintEngine::drawPoints(const QPoint *points, int pointCount)-
157{-
158 ((!(sizeof(QT_PointF) == sizeof(QPointF))) ? qt_assert("sizeof(QT_PointF) == sizeof(QPointF)",__FILE__,481) : qt_noop());-
159 QT_PointF fp[256];-
160 while (pointCount
pointCountDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
161 int i = 0;-
162 while (i < pointCount
i < pointCountDescription
TRUEnever evaluated
FALSEnever evaluated
&& i < 256
i < 256Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
163 fp[i].x = points[i].x();-
164 fp[i].y = points[i].y();-
165 ++i;-
166 }
never executed: end of block
0
167 drawPoints((QPointF *)(void *)fp, i);-
168 points += i;-
169 pointCount -= i;-
170 }
never executed: end of block
0
171}
never executed: end of block
0
172void QPaintEngine::drawEllipse(const QRectF &rect)-
173{-
174 QPainterPath path;-
175 path.addEllipse(rect);-
176 if (hasFeature(PainterPaths)
hasFeature(PainterPaths)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
177 drawPath(path);-
178 }
never executed: end of block
else {
0
179 QPolygonF polygon = path.toFillPolygon();-
180 drawPolygon(polygon.data(), polygon.size(), ConvexMode);-
181 }
never executed: end of block
0
182}-
183-
184-
185-
186-
187-
188void QPaintEngine::drawEllipse(const QRect &rect)-
189{-
190 drawEllipse(QRectF(rect));-
191}
never executed: end of block
0
192void qt_fill_tile(QPixmap *tile, const QPixmap &pixmap)-
193{-
194 QPainter p(tile);-
195 p.drawPixmap(0, 0, pixmap);-
196 int x = pixmap.width();-
197 while (x < tile->width()
x < tile->width()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
198 p.drawPixmap(x, 0, *tile, 0, 0, x, pixmap.height());-
199 x *= 2;-
200 }
never executed: end of block
0
201 int y = pixmap.height();-
202 while (y < tile->height()
y < tile->height()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
203 p.drawPixmap(0, y, *tile, 0, 0, tile->width(), y);-
204 y *= 2;-
205 }
never executed: end of block
0
206}
never executed: end of block
0
207-
208void qt_draw_tile(QPaintEngine *gc, qreal x, qreal y, qreal w, qreal h,-
209 const QPixmap &pixmap, qreal xOffset, qreal yOffset)-
210{-
211 qreal yPos, xPos, drawH, drawW, yOff, xOff;-
212 yPos = y;-
213 yOff = yOffset;-
214 while(yPos < y + h
yPos < y + hDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
215 drawH = pixmap.height() - yOff;-
216 if (yPos + drawH > y + h
yPos + drawH > y + hDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
217 drawH = y + h - yPos;
never executed: drawH = y + h - yPos;
0
218 xPos = x;-
219 xOff = xOffset;-
220 while(xPos < x + w
xPos < x + wDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
221 drawW = pixmap.width() - xOff;-
222 if (xPos + drawW > x + w
xPos + drawW > x + wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
223 drawW = x + w - xPos;
never executed: drawW = x + w - xPos;
0
224 if (drawW > 0
drawW > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& drawH > 0
drawH > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
225 gc->drawPixmap(QRectF(xPos, yPos, drawW, drawH), pixmap, QRectF(xOff, yOff, drawW, drawH));
never executed: gc->drawPixmap(QRectF(xPos, yPos, drawW, drawH), pixmap, QRectF(xOff, yOff, drawW, drawH));
0
226 xPos += drawW;-
227 xOff = 0;-
228 }
never executed: end of block
0
229 yPos += drawH;-
230 yOff = 0;-
231 }
never executed: end of block
0
232}
never executed: end of block
0
233-
234-
235-
236-
237-
238-
239-
240void QPaintEngine::drawTiledPixmap(const QRectF &rect, const QPixmap &pixmap, const QPointF &p)-
241{-
242 int sw = pixmap.width();-
243 int sh = pixmap.height();-
244-
245 if (sw*sh < 8192
sw*sh < 8192Description
TRUEnever evaluated
FALSEnever evaluated
&& sw*sh < 16*rect.width()*rect.height()
sw*sh < 16*rec...*rect.height()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
246 int tw = sw, th = sh;-
247 while (tw*th < 32678
tw*th < 32678Description
TRUEnever evaluated
FALSEnever evaluated
&& tw < rect.width()/2
tw < rect.width()/2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
248 tw *= 2;
never executed: tw *= 2;
0
249 while (tw*th < 32678
tw*th < 32678Description
TRUEnever evaluated
FALSEnever evaluated
&& th < rect.height()/2
th < rect.height()/2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
250 th *= 2;
never executed: th *= 2;
0
251 QPixmap tile;-
252 if (pixmap.depth() == 1
pixmap.depth() == 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
253 tile = QBitmap(tw, th);-
254 }
never executed: end of block
else {
0
255 tile = QPixmap(tw, th);-
256 if (pixmap.hasAlphaChannel()
pixmap.hasAlphaChannel()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
257 tile.fill(Qt::transparent);
never executed: tile.fill(Qt::transparent);
0
258 }
never executed: end of block
0
259 qt_fill_tile(&tile, pixmap);-
260 qt_draw_tile(this, rect.x(), rect.y(), rect.width(), rect.height(), tile, p.x(), p.y());-
261 }
never executed: end of block
else {
0
262 qt_draw_tile(this, rect.x(), rect.y(), rect.width(), rect.height(), pixmap, p.x(), p.y());-
263 }
never executed: end of block
0
264}-
265void QPaintEngine::drawImage(const QRectF &r, const QImage &image, const QRectF &sr,-
266 Qt::ImageConversionFlags flags)-
267{-
268 QRectF baseSize(0, 0, image.width(), image.height());-
269 QImage im = image;-
270 if (baseSize != sr
baseSize != srDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
271 im = im.copy(qFloor(sr.x()), qFloor(sr.y()),
never executed: im = im.copy(qFloor(sr.x()), qFloor(sr.y()), qCeil(sr.width()), qCeil(sr.height()));
0
272 qCeil(sr.width()), qCeil(sr.height()));
never executed: im = im.copy(qFloor(sr.x()), qFloor(sr.y()), qCeil(sr.width()), qCeil(sr.height()));
0
273 QPixmap pm = QPixmap::fromImage(im, flags);-
274 drawPixmap(r, pm, QRectF(QPointF(0, 0), pm.size()));-
275}
never executed: end of block
0
276QPaintEngine::QPaintEngine(PaintEngineFeatures caps)-
277 : state(0),-
278 gccaps(caps),-
279 active(0),-
280 selfDestruct(false),-
281 extended(false),-
282 d_ptr(new QPaintEnginePrivate)-
283{-
284 d_ptr->q_ptr = this;-
285}
never executed: end of block
0
286-
287-
288-
289-
290-
291QPaintEngine::QPaintEngine(QPaintEnginePrivate &dptr, PaintEngineFeatures caps)-
292 : state(0),-
293 gccaps(caps),-
294 active(0),-
295 selfDestruct(false),-
296 extended(false),-
297 d_ptr(&dptr)-
298{-
299 d_ptr->q_ptr = this;-
300}
never executed: end of block
0
301-
302-
303-
304-
305QPaintEngine::~QPaintEngine()-
306{-
307}-
308-
309-
310-
311-
312QPainter *QPaintEngine::painter() const-
313{-
314 return
never executed: return state ? state->painter() : 0;
state ? state->painter() : 0;
never executed: return state ? state->painter() : 0;
0
315}-
316-
317-
318-
319-
320-
321void QPaintEngine::drawPath(const QPainterPath &)-
322{-
323 if (hasFeature(PainterPaths)
hasFeature(PainterPaths)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
324 QMessageLogger(__FILE__, 741, __PRETTY_FUNCTION__).warning("QPaintEngine::drawPath: Must be implemented when feature PainterPaths is set");-
325 }
never executed: end of block
0
326}
never executed: end of block
0
327-
328-
329-
330-
331-
332-
333-
334void QPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem)-
335{-
336 const QTextItemInt &ti = static_cast<const QTextItemInt &>(textItem);-
337-
338 QPainterPath path;-
339 path.setFillRule(Qt::WindingFill);-
340 if (ti.glyphs.numGlyphs
ti.glyphs.numGlyphsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
341 ti.fontEngine->addOutlineToPath(0, 0, ti.glyphs, &path, ti.flags);
never executed: ti.fontEngine->addOutlineToPath(0, 0, ti.glyphs, &path, ti.flags);
0
342 if (!path.isEmpty()
!path.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
343 painter()->save();-
344 painter()->setRenderHint(QPainter::Antialiasing,-
345 bool((painter()->renderHints() & QPainter::TextAntialiasing)-
346 && !(painter()->font().styleStrategy() & QFont::NoAntialias)));-
347 painter()->translate(p.x(), p.y());-
348 painter()->fillPath(path, painter()->pen().brush());-
349 painter()->restore();-
350 }
never executed: end of block
0
351}
never executed: end of block
0
352-
353-
354-
355-
356-
357-
358void QPaintEngine::drawLines(const QLineF *lines, int lineCount)-
359{-
360 for (int i=0; i<lineCount
i<lineCountDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
361 QPointF pts[2] = { lines[i].p1(), lines[i].p2() };-
362-
363 if (pts[0] == pts[1]
pts[0] == pts[1]Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
364 if (state->pen().capStyle() != Qt::FlatCap
state->pen().c...!= Qt::FlatCapDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
365 drawPoints(pts, 1);
never executed: drawPoints(pts, 1);
0
366 continue;
never executed: continue;
0
367 }-
368-
369 drawPolygon(pts, 2, PolylineMode);-
370 }
never executed: end of block
0
371}
never executed: end of block
0
372void QPaintEngine::drawLines(const QLine *lines, int lineCount)-
373{-
374 struct PointF {-
375 qreal x;-
376 qreal y;-
377 };-
378 struct LineF {-
379 PointF p1;-
380 PointF p2;-
381 };-
382 ((!(sizeof(PointF) == sizeof(QPointF))) ? qt_assert("sizeof(PointF) == sizeof(QPointF)",__FILE__,807) : qt_noop());-
383 ((!(sizeof(LineF) == sizeof(QLineF))) ? qt_assert("sizeof(LineF) == sizeof(QLineF)",__FILE__,808) : qt_noop());-
384 LineF fl[256];-
385 while (lineCount
lineCountDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
386 int i = 0;-
387 while (i < lineCount
i < lineCountDescription
TRUEnever evaluated
FALSEnever evaluated
&& i < 256
i < 256Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
388 fl[i].p1.x = lines[i].x1();-
389 fl[i].p1.y = lines[i].y1();-
390 fl[i].p2.x = lines[i].x2();-
391 fl[i].p2.y = lines[i].y2();-
392 ++i;-
393 }
never executed: end of block
0
394 drawLines((QLineF *)(void *)fl, i);-
395 lines += i;-
396 lineCount -= i;-
397 }
never executed: end of block
0
398}
never executed: end of block
0
399void QPaintEngine::drawRects(const QRect *rects, int rectCount)-
400{-
401 struct RectF {-
402 qreal x;-
403 qreal y;-
404 qreal w;-
405 qreal h;-
406 };-
407 ((!(sizeof(RectF) == sizeof(QRectF))) ? qt_assert("sizeof(RectF) == sizeof(QRectF)",__FILE__,841) : qt_noop());-
408 RectF fr[256];-
409 while (rectCount
rectCountDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
410 int i = 0;-
411 while (i < rectCount
i < rectCountDescription
TRUEnever evaluated
FALSEnever evaluated
&& i < 256
i < 256Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
412 fr[i].x = rects[i].x();-
413 fr[i].y = rects[i].y();-
414 fr[i].w = rects[i].width();-
415 fr[i].h = rects[i].height();-
416 ++i;-
417 }
never executed: end of block
0
418 drawRects((QRectF *)(void *)fr, i);-
419 rects += i;-
420 rectCount -= i;-
421 }
never executed: end of block
0
422}
never executed: end of block
0
423-
424-
425-
426-
427-
428-
429void QPaintEngine::drawRects(const QRectF *rects, int rectCount)-
430{-
431 if (hasFeature(PainterPaths)
hasFeature(PainterPaths)Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
432 !state->penNeedsResolving()
!state->penNeedsResolving()Description
TRUEnever evaluated
FALSEnever evaluated
&&
0
433 !state->brushNeedsResolving()
!state->brushNeedsResolving()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
434 for (int i=0; i<rectCount
i<rectCountDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
435 QPainterPath path;-
436 path.addRect(rects[i]);-
437 if (path.isEmpty()
path.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
438 continue;
never executed: continue;
0
439 drawPath(path);-
440 }
never executed: end of block
0
441 }
never executed: end of block
else {
0
442 for (int i=0; i<rectCount
i<rectCountDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
443 QRectF rf = rects[i];-
444 QPointF pts[4] = { QPointF(rf.x(), rf.y()),-
445 QPointF(rf.x() + rf.width(), rf.y()),-
446 QPointF(rf.x() + rf.width(), rf.y() + rf.height()),-
447 QPointF(rf.x(), rf.y() + rf.height()) };-
448 drawPolygon(pts, 4, ConvexMode);-
449 }
never executed: end of block
0
450 }
never executed: end of block
0
451}-
452-
453-
454-
455-
456-
457void QPaintEngine::setPaintDevice(QPaintDevice *device)-
458{-
459 d_func()->pdev = device;-
460}
never executed: end of block
0
461-
462-
463-
464-
465-
466QPaintDevice *QPaintEngine::paintDevice() const-
467{-
468 return
never executed: return d_func()->pdev;
d_func()->pdev;
never executed: return d_func()->pdev;
0
469}-
470QPoint QPaintEngine::coordinateOffset() const-
471{-
472 return
never executed: return QPoint();
QPoint();
never executed: return QPoint();
0
473}-
474void QPaintEngine::setSystemClip(const QRegion &region)-
475{-
476 QPaintEnginePrivate * const d = d_func();-
477 d->systemClip = region;-
478-
479-
480 if (d->hasSystemTransform
d->hasSystemTransformDescription
TRUEnever evaluated
FALSEnever evaluated
|| d->hasSystemViewport
d->hasSystemViewportDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
481 d->transformSystemClip();-
482 d->systemStateChanged();-
483 }
never executed: end of block
0
484}
never executed: end of block
0
485QRegion QPaintEngine::systemClip() const-
486{-
487 return
never executed: return d_func()->systemClip;
d_func()->systemClip;
never executed: return d_func()->systemClip;
0
488}-
489-
490-
491-
492-
493-
494-
495-
496void QPaintEngine::setSystemRect(const QRect &rect)-
497{-
498 if (isActive()
isActive()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
499 QMessageLogger(__FILE__, 963, __PRETTY_FUNCTION__).warning("QPaintEngine::setSystemRect: Should not be changed while engine is active");-
500 return;
never executed: return;
0
501 }-
502 d_func()->systemRect = rect;-
503}
never executed: end of block
0
504-
505-
506-
507-
508-
509-
510-
511QRect QPaintEngine::systemRect() const-
512{-
513 return
never executed: return d_func()->systemRect;
d_func()->systemRect;
never executed: return d_func()->systemRect;
0
514}-
515-
516QPaintEnginePrivate::~QPaintEnginePrivate()-
517{-
518}-
519-
520void QPaintEnginePrivate::drawBoxTextItem(const QPointF &p, const QTextItemInt &ti)-
521{-
522 if (!ti.glyphs.numGlyphs
!ti.glyphs.numGlyphsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
523 return;
never executed: return;
0
524-
525-
526 const int size = qRound(ti.fontEngine->ascent());-
527 QVarLengthArray<QFixedPoint> positions;-
528 QVarLengthArray<glyph_t> glyphs;-
529 QTransform matrix = QTransform::fromTranslate(p.x(), p.y() - size);-
530 ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions);-
531 if (glyphs.size() == 0
glyphs.size() == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
532 return;
never executed: return;
0
533-
534 QSize s(size - 3, size - 3);-
535-
536 QPainter *painter = q_func()->state->painter();-
537 painter->save();-
538 painter->setBrush(Qt::NoBrush);-
539 QPen pen = painter->pen();-
540 pen.setWidthF(ti.fontEngine->lineThickness().toReal());-
541 painter->setPen(pen);-
542 for (int k = 0; k < positions.size()
k < positions.size()Description
TRUEnever evaluated
FALSEnever evaluated
; k++)
0
543 painter->drawRect(QRectF(positions[k].toPointF(), s));
never executed: painter->drawRect(QRectF(positions[k].toPointF(), s));
0
544 painter->restore();-
545}
never executed: end of block
0
546-
547-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9