Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/scenegraph/qsgdistancefieldglyphnode_p_p.h |
Source code | Switch to Preprocessed file |
Line | Source | Count |
---|---|---|
1 | /**************************************************************************** | - |
2 | ** | - |
3 | ** Copyright (C) 2016 The Qt Company Ltd. | - |
4 | ** Contact: https://www.qt.io/licensing/ | - |
5 | ** | - |
6 | ** This file is part of the QtQuick module of the Qt Toolkit. | - |
7 | ** | - |
8 | ** $QT_BEGIN_LICENSE:LGPL$ | - |
9 | ** Commercial License Usage | - |
10 | ** Licensees holding valid commercial Qt licenses may use this file in | - |
11 | ** accordance with the commercial license agreement provided with the | - |
12 | ** Software or, alternatively, in accordance with the terms contained in | - |
13 | ** a written agreement between you and The Qt Company. For licensing terms | - |
14 | ** and conditions see https://www.qt.io/terms-conditions. For further | - |
15 | ** information use the contact form at https://www.qt.io/contact-us. | - |
16 | ** | - |
17 | ** GNU Lesser General Public License Usage | - |
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - |
19 | ** General Public License version 3 as published by the Free Software | - |
20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the | - |
21 | ** packaging of this file. Please review the following information to | - |
22 | ** ensure the GNU Lesser General Public License version 3 requirements | - |
23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. | - |
24 | ** | - |
25 | ** GNU General Public License Usage | - |
26 | ** Alternatively, this file may be used under the terms of the GNU | - |
27 | ** General Public License version 2.0 or (at your option) the GNU General | - |
28 | ** Public license version 3 or any later version approved by the KDE Free | - |
29 | ** Qt Foundation. The licenses are as published by the Free Software | - |
30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 | - |
31 | ** included in the packaging of this file. Please review the following | - |
32 | ** information to ensure the GNU General Public License requirements will | - |
33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and | - |
34 | ** https://www.gnu.org/licenses/gpl-3.0.html. | - |
35 | ** | - |
36 | ** $QT_END_LICENSE$ | - |
37 | ** | - |
38 | ****************************************************************************/ | - |
39 | - | |
40 | #ifndef QSGDISTANCEFIELDGLYPHNODE_P_P_H | - |
41 | #define QSGDISTANCEFIELDGLYPHNODE_P_P_H | - |
42 | - | |
43 | // | - |
44 | // W A R N I N G | - |
45 | // ------------- | - |
46 | // | - |
47 | // This file is not part of the Qt API. It exists purely as an | - |
48 | // implementation detail. This header file may change from version to | - |
49 | // version without notice, or even be removed. | - |
50 | // | - |
51 | // We mean it. | - |
52 | // | - |
53 | - | |
54 | #include <QtQuick/qsgmaterial.h> | - |
55 | #include "qsgdistancefieldglyphnode_p.h" | - |
56 | #include "qsgadaptationlayer_p.h" | - |
57 | - | |
58 | QT_BEGIN_NAMESPACE | - |
59 | - | |
60 | class Q_QUICK_PRIVATE_EXPORT QSGDistanceFieldTextMaterial: public QSGMaterial | - |
61 | { | - |
62 | public: | - |
63 | QSGDistanceFieldTextMaterial(); | - |
64 | ~QSGDistanceFieldTextMaterial(); | - |
65 | - | |
66 | QSGMaterialType *type() const override; | - |
67 | QSGMaterialShader *createShader() const override; | - |
68 | int compare(const QSGMaterial *other) const override; | - |
69 | - | |
70 | virtual void setColor(const QColor &color); | - |
71 | const QVector4D &color() const { return m_color; } executed 77490 times by 24 tests: return m_color; Executed by:
| 77490 |
72 | - | |
73 | void setGlyphCache(QSGDistanceFieldGlyphCache *a) { m_glyph_cache = a; } executed 249131 times by 24 tests: end of block Executed by:
| 249131 |
74 | QSGDistanceFieldGlyphCache *glyphCache() const { return m_glyph_cache; } executed 34196 times by 24 tests: return m_glyph_cache; Executed by:
| 34196 |
75 | - | |
76 | void setTexture(const QSGDistanceFieldGlyphCache::Texture * tex) { m_texture = tex; } executed 240904 times by 24 tests: end of block Executed by:
| 240904 |
77 | const QSGDistanceFieldGlyphCache::Texture * texture() const { return m_texture; } executed 35298 times by 24 tests: return m_texture; Executed by:
| 35298 |
78 | - | |
79 | void setFontScale(qreal fontScale) { m_fontScale = fontScale; } executed 249131 times by 24 tests: end of block Executed by:
| 249131 |
80 | qreal fontScale() const { return m_fontScale; } executed 79124 times by 24 tests: return m_fontScale; Executed by:
| 79124 |
81 | - | |
82 | QSize textureSize() const { return m_size; } executed 66180 times by 24 tests: return m_size; Executed by:
| 66180 |
83 | - | |
84 | bool updateTextureSize(); | - |
85 | - | |
86 | protected: | - |
87 | QSize m_size; | - |
88 | QVector4D m_color; | - |
89 | QSGDistanceFieldGlyphCache *m_glyph_cache; | - |
90 | const QSGDistanceFieldGlyphCache::Texture *m_texture; | - |
91 | qreal m_fontScale; | - |
92 | }; | - |
93 | - | |
94 | class Q_QUICK_PRIVATE_EXPORT QSGDistanceFieldStyledTextMaterial : public QSGDistanceFieldTextMaterial | - |
95 | { | - |
96 | public: | - |
97 | QSGDistanceFieldStyledTextMaterial(); | - |
98 | ~QSGDistanceFieldStyledTextMaterial(); | - |
99 | - | |
100 | QSGMaterialType *type() const override = 0; | - |
101 | QSGMaterialShader *createShader() const override = 0; | - |
102 | int compare(const QSGMaterial *other) const override; | - |
103 | - | |
104 | void setStyleColor(const QColor &color); | - |
105 | const QVector4D &styleColor() const { return m_styleColor; } executed 20 times by 1 test: return m_styleColor; Executed by:
| 20 |
106 | - | |
107 | protected: | - |
108 | QVector4D m_styleColor; | - |
109 | }; | - |
110 | - | |
111 | class Q_QUICK_PRIVATE_EXPORT QSGDistanceFieldOutlineTextMaterial : public QSGDistanceFieldStyledTextMaterial | - |
112 | { | - |
113 | public: | - |
114 | QSGDistanceFieldOutlineTextMaterial(); | - |
115 | ~QSGDistanceFieldOutlineTextMaterial(); | - |
116 | - | |
117 | QSGMaterialType *type() const override; | - |
118 | QSGMaterialShader *createShader() const override; | - |
119 | }; | - |
120 | - | |
121 | class Q_QUICK_PRIVATE_EXPORT QSGDistanceFieldShiftedStyleTextMaterial : public QSGDistanceFieldStyledTextMaterial | - |
122 | { | - |
123 | public: | - |
124 | QSGDistanceFieldShiftedStyleTextMaterial(); | - |
125 | ~QSGDistanceFieldShiftedStyleTextMaterial(); | - |
126 | - | |
127 | QSGMaterialType *type() const override; | - |
128 | QSGMaterialShader *createShader() const override; | - |
129 | int compare(const QSGMaterial *other) const override; | - |
130 | - | |
131 | void setShift(const QPointF &shift) { m_shift = shift; } executed 26 times by 1 test: end of block Executed by:
| 26 |
132 | const QPointF &shift() const { return m_shift; } executed 12 times by 1 test: return m_shift; Executed by:
| 12 |
133 | - | |
134 | protected: | - |
135 | QPointF m_shift; | - |
136 | }; | - |
137 | - | |
138 | class Q_QUICK_PRIVATE_EXPORT QSGHiQSubPixelDistanceFieldTextMaterial : public QSGDistanceFieldTextMaterial | - |
139 | { | - |
140 | public: | - |
141 | QSGMaterialType *type() const override; | - |
142 | QSGMaterialShader *createShader() const override; | - |
143 | void setColor(const QColor &color) override { m_color = QVector4D(color.redF(), color.greenF(), color.blueF(), color.alphaF()); } executed 249097 times by 24 tests: end of block Executed by:
| 249097 |
144 | }; | - |
145 | - | |
146 | class Q_QUICK_PRIVATE_EXPORT QSGLoQSubPixelDistanceFieldTextMaterial : public QSGDistanceFieldTextMaterial | - |
147 | { | - |
148 | public: | - |
149 | QSGMaterialType *type() const override; | - |
150 | QSGMaterialShader *createShader() const override; | - |
151 | void setColor(const QColor &color) override { m_color = QVector4D(color.redF(), color.greenF(), color.blueF(), color.alphaF()); } never executed: end of block | 0 |
152 | }; | - |
153 | - | |
154 | QT_END_NAMESPACE | - |
155 | - | |
156 | #endif | - |
Source code | Switch to Preprocessed file |