Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/util/qsgsimplerectnode.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | QSGSimpleRectNode::QSGSimpleRectNode(const QRectF &rect, const QColor &color) | - | ||||||
4 | : m_geometry(QSGGeometry::defaultAttributes_Point2D(), 4) | - | ||||||
5 | { | - | ||||||
6 | (void)reserved;; | - | ||||||
7 | QSGGeometry::updateRectGeometry(&m_geometry, rect); | - | ||||||
8 | m_material.setColor(color); | - | ||||||
9 | setMaterial(&m_material); | - | ||||||
10 | setGeometry(&m_geometry); | - | ||||||
11 | } never executed: end of block | 0 | ||||||
12 | - | |||||||
13 | - | |||||||
14 | - | |||||||
15 | - | |||||||
16 | - | |||||||
17 | - | |||||||
18 | - | |||||||
19 | QSGSimpleRectNode::QSGSimpleRectNode() | - | ||||||
20 | : m_geometry(QSGGeometry::defaultAttributes_Point2D(), 4) | - | ||||||
21 | { | - | ||||||
22 | QSGGeometry::updateRectGeometry(&m_geometry, QRectF()); | - | ||||||
23 | setMaterial(&m_material); | - | ||||||
24 | setGeometry(&m_geometry); | - | ||||||
25 | } executed 200010 times by 3 tests: end of block Executed by:
| 200010 | ||||||
26 | - | |||||||
27 | - | |||||||
28 | - | |||||||
29 | - | |||||||
30 | - | |||||||
31 | - | |||||||
32 | void QSGSimpleRectNode::setRect(const QRectF &rect) | - | ||||||
33 | { | - | ||||||
34 | QSGGeometry::updateRectGeometry(&m_geometry, rect); | - | ||||||
35 | markDirty(QSGNode::DirtyGeometry); | - | ||||||
36 | } executed 200010 times by 3 tests: end of block Executed by:
| 200010 | ||||||
37 | QRectF QSGSimpleRectNode::rect() const | - | ||||||
38 | { | - | ||||||
39 | const QSGGeometry::Point2D *pts = m_geometry.vertexDataAsPoint2D(); | - | ||||||
40 | return executed 98 times by 1 test: QRectF(pts[0].x,return QRectF(pts[0].x, pts[0].y, pts[3].x - pts[0].x, pts[3].y - pts[0].y); Executed by:
executed 98 times by 1 test: return QRectF(pts[0].x, pts[0].y, pts[3].x - pts[0].x, pts[3].y - pts[0].y); Executed by:
| 98 | ||||||
41 | pts[0].y, executed 98 times by 1 test: return QRectF(pts[0].x, pts[0].y, pts[3].x - pts[0].x, pts[3].y - pts[0].y); Executed by:
| 98 | ||||||
42 | pts[3].x - pts[0].x, executed 98 times by 1 test: return QRectF(pts[0].x, pts[0].y, pts[3].x - pts[0].x, pts[3].y - pts[0].y); Executed by:
| 98 | ||||||
43 | pts[3].y - pts[0].y); executed 98 times by 1 test: return QRectF(pts[0].x, pts[0].y, pts[3].x - pts[0].x, pts[3].y - pts[0].y); Executed by:
| 98 | ||||||
44 | } | - | ||||||
45 | - | |||||||
46 | - | |||||||
47 | - | |||||||
48 | - | |||||||
49 | - | |||||||
50 | - | |||||||
51 | void QSGSimpleRectNode::setColor(const QColor &color) | - | ||||||
52 | { | - | ||||||
53 | if (color != m_material.color()
| 0-200000 | ||||||
54 | m_material.setColor(color); | - | ||||||
55 | markDirty(QSGNode::DirtyMaterial); | - | ||||||
56 | } executed 200000 times by 1 test: end of block Executed by:
| 200000 | ||||||
57 | } executed 200000 times by 1 test: end of block Executed by:
| 200000 | ||||||
58 | - | |||||||
59 | - | |||||||
60 | - | |||||||
61 | - | |||||||
62 | - | |||||||
63 | - | |||||||
64 | QColor QSGSimpleRectNode::color() const | - | ||||||
65 | { | - | ||||||
66 | return executed 40 times by 1 test: m_material.color();return m_material.color(); Executed by:
executed 40 times by 1 test: return m_material.color(); Executed by:
| 40 | ||||||
67 | } | - | ||||||
68 | - | |||||||
69 | - | |||||||
Switch to Source code | Preprocessed file |