OpenCoverage

qsgsoftwareglyphnode.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/adaptations/software/qsgsoftwareglyphnode.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4QSGSoftwareGlyphNode::QSGSoftwareGlyphNode()-
5 : m_geometry(QSGGeometry::defaultAttributes_TexturedPoint2D(), 0)-
6 , m_style(QQuickText::Normal)-
7{-
8 setMaterial((QSGMaterial*)1);-
9 setGeometry(&m_geometry);-
10}
never executed: end of block
0
11-
12-
13void QSGSoftwareGlyphNode::setGlyphs(const QPointF &position, const QGlyphRun &glyphs)-
14{-
15 m_position = position;-
16 m_glyphRun = glyphs;-
17 m_bounding_rect = glyphs.boundingRect().translated(m_position - QPointF(0.0, glyphs.rawFont().ascent()));-
18}
never executed: end of block
0
19-
20void QSGSoftwareGlyphNode::setColor(const QColor &color)-
21{-
22 m_color = color;-
23}
never executed: end of block
0
24-
25void QSGSoftwareGlyphNode::setStyle(QQuickText::TextStyle style)-
26{-
27 m_style = style;-
28}
never executed: end of block
0
29-
30void QSGSoftwareGlyphNode::setStyleColor(const QColor &color)-
31{-
32 m_styleColor = color;-
33}
never executed: end of block
0
34-
35QPointF QSGSoftwareGlyphNode::baseLine() const-
36{-
37 return
never executed: return QPointF();
QPointF();
never executed: return QPointF();
0
38}-
39-
40void QSGSoftwareGlyphNode::setPreferredAntialiasingMode(QSGGlyphNode::AntialiasingMode)-
41{-
42}-
43-
44void QSGSoftwareGlyphNode::update()-
45{-
46}-
47-
48void QSGSoftwareGlyphNode::paint(QPainter *painter)-
49{-
50 painter->setBrush(QBrush());-
51 QPointF pos = m_position - QPointF(0, m_glyphRun.rawFont().ascent());-
52-
53 qreal offset = 1.0;-
54 if (painter->device()->devicePixelRatio() != 0
painter->devic...elRatio() != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
55 offset = 1.0 / painter->device()->devicePixelRatio();
never executed: offset = 1.0 / painter->device()->devicePixelRatio();
0
56-
57 switch (m_style) {-
58 case
never executed: case QQuickText::Normal:
QQuickText::Normal:
never executed: case QQuickText::Normal:
break;
never executed: break;
0
59 case
never executed: case QQuickText::Outline:
QQuickText::Outline:
never executed: case QQuickText::Outline:
0
60 painter->setPen(m_styleColor);-
61 painter->drawGlyphRun(pos + QPointF(0, offset), m_glyphRun);-
62 painter->drawGlyphRun(pos + QPointF(0, -offset), m_glyphRun);-
63 painter->drawGlyphRun(pos + QPointF(offset, 0), m_glyphRun);-
64 painter->drawGlyphRun(pos + QPointF(-offset, 0), m_glyphRun);-
65 break;
never executed: break;
0
66 case
never executed: case QQuickText::Raised:
QQuickText::Raised:
never executed: case QQuickText::Raised:
0
67 painter->setPen(m_styleColor);-
68 painter->drawGlyphRun(pos + QPointF(0, offset), m_glyphRun);-
69 break;
never executed: break;
0
70 case
never executed: case QQuickText::Sunken:
QQuickText::Sunken:
never executed: case QQuickText::Sunken:
0
71 painter->setPen(m_styleColor);-
72 painter->drawGlyphRun(pos + QPointF(0, -offset), m_glyphRun);-
73 break;
never executed: break;
0
74 }-
75-
76 painter->setPen(m_color);-
77 painter->drawGlyphRun(pos, m_glyphRun);-
78}
never executed: end of block
0
79-
80-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0