OpenCoverage

qquickcontext2d.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/quick/items/context2d/qquickcontext2d.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12-
13-
14-
15-
16-
17-
18-
19__attribute__((visibility("default"))) double qstrtod(const char *s00, char const **se, bool *ok);-
20__attribute__((visibility("default"))) QColor qt_color_from_string(const QV4::Value &name)-
21{-
22 QByteArray str = name.toQString().toUtf8();-
23-
24 char *p = str.data();-
25 int len = str.length();-
26-
27 if (!p
!pDescription
TRUEnever evaluated
FALSEnever evaluated
|| len > 255
len > 255Description
TRUEnever evaluated
FALSEnever evaluated
|| len <= 7
len <= 7Description
TRUEnever evaluated
FALSEnever evaluated
)
0
28 return
never executed: return QColor(p);
QColor(p);
never executed: return QColor(p);
0
29 else {-
30 bool isRgb(false), isHsl(false), hasAlpha(false);-
31 (void)isHsl;-
32-
33 while (isspace(*p)
isspace(*p)Description
TRUEnever evaluated
FALSEnever evaluated
) p++;
never executed: p++;
0
34 if (strncmp(p, "rgb", 3) == 0
strncmp(p, "rgb", 3) == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
35 isRgb = true;
never executed: isRgb = true;
0
36 else if (strncmp(p, "hsl", 3) == 0
strncmp(p, "hsl", 3) == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
37 isHsl = true;
never executed: isHsl = true;
0
38 else-
39 return
never executed: return QColor(p);
QColor(p);
never executed: return QColor(p);
0
40-
41 p+=3;-
42 hasAlpha = (*
(*p == 'a')Description
TRUEnever evaluated
FALSEnever evaluated
p == 'a')
(*p == 'a')Description
TRUEnever evaluated
FALSEnever evaluated
? true : false;
0
43-
44 ++p;-
45-
46 if (hasAlpha
hasAlphaDescription
TRUEnever evaluated
FALSEnever evaluated
) ++
never executed: ++p;
p;
never executed: ++p;
0
47-
48 int rh, gs, bl, alpha = 255;-
49-
50-
51 while (isspace(*p)
isspace(*p)Description
TRUEnever evaluated
FALSEnever evaluated
) p++;
never executed: p++;
0
52 rh = strtol(p, &p, 10);-
53 if (*
*p == '%'Description
TRUEnever evaluated
FALSEnever evaluated
p == '%'
*p == '%'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
54 rh = qRound(rh/100.0 * 255);-
55 ++p;-
56 }
never executed: end of block
0
57 if (*
*p++ != ','Description
TRUEnever evaluated
FALSEnever evaluated
p++ != ','
*p++ != ','Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return QColor();
QColor();
never executed: return QColor();
0
58-
59-
60 while (isspace(*p)
isspace(*p)Description
TRUEnever evaluated
FALSEnever evaluated
) p++;
never executed: p++;
0
61 gs = strtol(p, &p, 10);-
62 if (*
*p == '%'Description
TRUEnever evaluated
FALSEnever evaluated
p == '%'
*p == '%'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
63 gs = qRound(gs/100.0 * 255);-
64 ++p;-
65 }
never executed: end of block
0
66 if (*
*p++ != ','Description
TRUEnever evaluated
FALSEnever evaluated
p++ != ','
*p++ != ','Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return QColor();
QColor();
never executed: return QColor();
0
67-
68-
69 while (isspace(*p)
isspace(*p)Description
TRUEnever evaluated
FALSEnever evaluated
) p++;
never executed: p++;
0
70 bl = strtol(p, &p, 10);-
71 if (*
*p == '%'Description
TRUEnever evaluated
FALSEnever evaluated
p == '%'
*p == '%'Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
72 bl = qRound(bl/100.0 * 255);-
73 ++p;-
74 }
never executed: end of block
0
75-
76 if (hasAlpha
hasAlphaDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
77 if (*
*p++!= ','Description
TRUEnever evaluated
FALSEnever evaluated
p++!= ','
*p++!= ','Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return QColor();
QColor();
never executed: return QColor();
0
78 while (isspace(*p)
isspace(*p)Description
TRUEnever evaluated
FALSEnever evaluated
) p++;
never executed: p++;
0
79 bool ok = false;-
80 alpha = qRound(qstrtod(p, const_cast<const char **>(&p), &ok) * 255);-
81 }
never executed: end of block
0
82-
83 if (*
*p != ')'Description
TRUEnever evaluated
FALSEnever evaluated
p != ')'
*p != ')'Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return QColor();
QColor();
never executed: return QColor();
0
84 if (isRgb
isRgbDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
85 return
never executed: return QColor::fromRgba(qRgba(qMin(qMax(rh, 0), 255), qMin(qMax(gs, 0), 255), qMin(qMax(bl, 0), 255), qMin(qMax(alpha, 0), 255)));
QColor::fromRgba(qRgba(qMin(qMax(rh, 0), 255), qMin(qMax(gs, 0), 255), qMin(qMax(bl, 0), 255), qMin(qMax(alpha, 0), 255)));
never executed: return QColor::fromRgba(qRgba(qMin(qMax(rh, 0), 255), qMin(qMax(gs, 0), 255), qMin(qMax(bl, 0), 255), qMin(qMax(alpha, 0), 255)));
0
86 else if (isHsl
isHslDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
87 return
never executed: return QColor::fromHsl(qMin(qMax(rh, 0), 359), qMin(qMax(gs, 0), 255), qMin(qMax(bl, 0), 255), qMin(qMax(alpha, 0), 255));
QColor::fromHsl(qMin(qMax(rh, 0), 359), qMin(qMax(gs, 0), 255), qMin(qMax(bl, 0), 255), qMin(qMax(alpha, 0), 255));
never executed: return QColor::fromHsl(qMin(qMax(rh, 0), 359), qMin(qMax(gs, 0), 255), qMin(qMax(bl, 0), 255), qMin(qMax(alpha, 0), 255));
0
88 }
never executed: end of block
0
89 return
never executed: return QColor();
QColor();
never executed: return QColor();
0
90}-
91-
92static int qParseFontSizeFromToken(const QStringRef &fontSizeToken, bool &ok)-
93{-
94 ok = false;-
95 float size = fontSizeToken.trimmed().toFloat(&ok);-
96 if (ok
okDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
97 return
never executed: return int(size);
int(size);
never executed: return int(size);
0
98 }-
99 QMessageLogger(__FILE__, 219, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: A font size of " << fontSizeToken << " is invalid.";-
100 return
never executed: return 0;
0;
never executed: return 0;
0
101}-
102-
103-
104-
105-
106-
107-
108static bool qSetFontSizeFromToken(QFont &font, const QStringRef &fontSizeToken)-
109{-
110 const QStringRef trimmedToken = fontSizeToken.trimmed();-
111 const QStringRef unitStr = trimmedToken.right(2);-
112 const QStringRef value = trimmedToken.left(trimmedToken.size() - 2);-
113 bool ok = false;-
114 int size = 0;-
115 if (unitStr == QLatin1String("px")
unitStr == QLatin1String("px")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
116 size = qParseFontSizeFromToken(value, ok);-
117 if (ok
okDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
118 font.setPixelSize(size);-
119 return
never executed: return true;
true;
never executed: return true;
0
120 }-
121 }
never executed: end of block
else if (unitStr == QLatin1String("pt")
unitStr == QLatin1String("pt")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
122 size = qParseFontSizeFromToken(value, ok);-
123 if (ok
okDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
124 font.setPointSize(size);-
125 return
never executed: return true;
true;
never executed: return true;
0
126 }-
127 }
never executed: end of block
else {
0
128 QMessageLogger(__FILE__, 248, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: Invalid font size unit in font string.";-
129 }
never executed: end of block
0
130 return
never executed: return false;
false;
never executed: return false;
0
131}-
132-
133-
134-
135-
136-
137-
138static QStringList qExtractFontFamiliesFromString(const QStringRef &fontFamiliesString)-
139{-
140 QStringList extractedFamilies;-
141 int quoteIndex = -1;-
142 QString currentFamily;-
143 for (int index = 0; index < fontFamiliesString.size()
index < fontFa...sString.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++index) {
0
144 const QChar ch = fontFamiliesString.at(index);-
145 if (ch == '"'
ch == '"'Description
TRUEnever evaluated
FALSEnever evaluated
|| ch == '\''
ch == '\''Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
146 if (quoteIndex == -1
quoteIndex == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
147 quoteIndex = index;-
148 }
never executed: end of block
else {
0
149 if (ch == fontFamiliesString.at(quoteIndex)
ch == fontFami...at(quoteIndex)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
150-
151 const QString family = fontFamiliesString.mid(quoteIndex + 1, index - quoteIndex - 1).toString();-
152 extractedFamilies.push_back(family);-
153 currentFamily.clear();-
154 quoteIndex = -1;-
155 }
never executed: end of block
else {
0
156 QMessageLogger(__FILE__, 276, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: Mismatched quote in font string.";-
157 return
never executed: return QStringList();
QStringList();
never executed: return QStringList();
0
158 }-
159 }-
160 } else if (ch == ' '
ch == ' 'Description
TRUEnever evaluated
FALSEnever evaluated
&& quoteIndex == -1
quoteIndex == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
161-
162 if (!currentFamily.isEmpty()
!currentFamily.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
163-
164 extractedFamilies.push_back(currentFamily);-
165 currentFamily.clear();-
166 }
never executed: end of block
0
167 }
never executed: end of block
else {
0
168 currentFamily.push_back(ch);-
169 }
never executed: end of block
0
170 }-
171 if (!currentFamily.isEmpty()
!currentFamily.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
172 if (quoteIndex == -1
quoteIndex == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
173-
174 extractedFamilies.push_back(currentFamily);-
175 }
never executed: end of block
else {
0
176 QMessageLogger(__FILE__, 296, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: Unclosed quote in font string.";-
177 return
never executed: return QStringList();
QStringList();
never executed: return QStringList();
0
178 }-
179 }-
180 if (extractedFamilies.isEmpty()
extractedFamilies.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
181 QMessageLogger(__FILE__, 301, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: Missing or misplaced font family in font string"-
182 << " (it must come after the font size).";-
183 }
never executed: end of block
0
184 return
never executed: return extractedFamilies;
extractedFamilies;
never executed: return extractedFamilies;
0
185}-
186static bool qSetFontFamilyFromTokens(QFont &font, const QStringList &fontFamilyTokens)-
187{-
188 for (const QString &fontFamilyToken : fontFamilyTokens) {-
189 QFontDatabase fontDatabase;-
190 if (fontDatabase.hasFamily(fontFamilyToken)
fontDatabase.h...ntFamilyToken)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
191 font.setFamily(fontFamilyToken);-
192 return
never executed: return true;
true;
never executed: return true;
0
193 } else {-
194-
195-
196 int styleHint = -1;-
197 if (fontFamilyToken.compare(QLatin1String("serif")) == 0
fontFamilyToke..."serif")) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
198 styleHint = QFont::Serif;-
199 }
never executed: end of block
else if (fontFamilyToken.compare(QLatin1String("sans-serif")) == 0
fontFamilyToke...-serif")) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
200 styleHint = QFont::SansSerif;-
201 }
never executed: end of block
else if (fontFamilyToken.compare(QLatin1String("cursive")) == 0
fontFamilyToke...ursive")) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
202 styleHint = QFont::Cursive;-
203 }
never executed: end of block
else if (fontFamilyToken.compare(QLatin1String("monospace")) == 0
fontFamilyToke...ospace")) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
204 styleHint = QFont::Monospace;-
205 }
never executed: end of block
else if (fontFamilyToken.compare(QLatin1String("fantasy")) == 0
fontFamilyToke...antasy")) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
206 styleHint = QFont::Fantasy;-
207 }
never executed: end of block
0
208 if (styleHint != -1
styleHint != -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
209 QFont tmp;-
210 tmp.setStyleHint(static_cast<QFont::StyleHint>(styleHint));-
211 font.setFamily(tmp.defaultFamily());-
212 return
never executed: return true;
true;
never executed: return true;
0
213 }-
214 }
never executed: end of block
0
215 }-
216 QMessageLogger(__FILE__, 346, __PRETTY_FUNCTION__).warning("Context2D: The font families specified are invalid: %s", QtPrivate::asString(fontFamilyTokens.join(QString()).trimmed()).toLocal8Bit().constData());-
217 return
never executed: return false;
false;
never executed: return false;
0
218}-
219-
220enum FontToken-
221{-
222 NoTokens = 0x00,-
223 FontStyle = 0x01,-
224 FontVariant = 0x02,-
225 FontWeight = 0x04-
226};-
227static QFont qt_font_from_string(const QString& fontString, const QFont &currentFont) {-
228 if (fontString.isEmpty()
fontString.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
229 QMessageLogger(__FILE__, 374, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: Font string is empty.";-
230 return
never executed: return currentFont;
currentFont;
never executed: return currentFont;
0
231 }-
232-
233-
234-
235 int fontSizeEnd = fontString.indexOf(QLatin1String("px"));-
236 if (fontSizeEnd == -1
fontSizeEnd == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
237 fontSizeEnd = fontString.indexOf(QLatin1String("pt"));
never executed: fontSizeEnd = fontString.indexOf(QLatin1String("pt"));
0
238 if (fontSizeEnd == -1
fontSizeEnd == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
239 QMessageLogger(__FILE__, 384, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: Invalid font size unit in font string.";-
240 return
never executed: return currentFont;
currentFont;
never executed: return currentFont;
0
241 }-
242-
243 int fontSizeStart = fontString.lastIndexOf(' ', fontSizeEnd);-
244 if (fontSizeStart == -1
fontSizeStart == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
245-
246-
247 fontSizeStart = 0;-
248 }
never executed: end of block
else {
0
249-
250 ++fontSizeStart;-
251 }
never executed: end of block
0
252-
253-
254 fontSizeEnd += 3;-
255-
256 QFont newFont;-
257 if (!qSetFontSizeFromToken(newFont, fontString.midRef(fontSizeStart, fontSizeEnd - fontSizeStart))
!qSetFontSizeF...ontSizeStart))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
258 return
never executed: return currentFont;
currentFont;
never executed: return currentFont;
0
259-
260-
261 QString remainingFontString = fontString;-
262 remainingFontString.remove(fontSizeStart, fontSizeEnd - fontSizeStart);-
263 QStringRef remainingFontStringRef(&remainingFontString);-
264-
265-
266 const QStringRef fontFamiliesString = remainingFontStringRef.mid(fontSizeStart);-
267 remainingFontStringRef.truncate(fontSizeStart);-
268 QStringList fontFamilies = qExtractFontFamiliesFromString(fontFamiliesString);-
269 if (fontFamilies.isEmpty()
fontFamilies.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
270 return
never executed: return currentFont;
currentFont;
never executed: return currentFont;
0
271 }-
272 if (!qSetFontFamilyFromTokens(newFont, fontFamilies)
!qSetFontFamil... fontFamilies)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
273 return
never executed: return currentFont;
currentFont;
never executed: return currentFont;
0
274-
275-
276 const QStringRef trimmedTokensStr = remainingFontStringRef.trimmed();-
277 if (trimmedTokensStr.isEmpty()
trimmedTokensStr.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
278-
279 return
never executed: return newFont;
newFont;
never executed: return newFont;
0
280 }-
281 const auto tokens = trimmedTokensStr.split(QLatin1Char(' '));-
282-
283 int usedTokens = NoTokens;-
284-
285 for (const QStringRef &token : tokens) {-
286 if (token.compare(QLatin1String("normal")) == 0
token.compare(...normal")) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
287 if (!(usedTokens & FontStyle)
!(usedTokens & FontStyle)Description
TRUEnever evaluated
FALSEnever evaluated
|| !(usedTokens & FontVariant)
!(usedTokens & FontVariant)Description
TRUEnever evaluated
FALSEnever evaluated
|| !(usedTokens & FontWeight)
!(usedTokens & FontWeight)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
288-
289 if (!(usedTokens & FontStyle)
!(usedTokens & FontStyle)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
290-
291 usedTokens = usedTokens | FontStyle;-
292 }
never executed: end of block
else if (!(usedTokens & FontVariant)
!(usedTokens & FontVariant)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
293-
294 usedTokens |= FontVariant;-
295 }
never executed: end of block
else if (!(usedTokens & FontWeight)
!(usedTokens & FontWeight)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
296-
297 usedTokens |= FontWeight;-
298 }
never executed: end of block
0
299 }
never executed: end of block
else {
0
300 QMessageLogger(__FILE__, 445, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: Duplicate token \"normal\" found in font string.";-
301 return
never executed: return currentFont;
currentFont;
never executed: return currentFont;
0
302 }-
303 } else if (token.compare(QLatin1String("bold")) == 0
token.compare(...("bold")) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
304 if (!(usedTokens & FontWeight)
!(usedTokens & FontWeight)Description
TRUEnever evaluated
FALSEnever evaluated
) { usedTokens |= FontWeight; newFont.setBold(true); }
never executed: end of block
else { QMessageLogger(__FILE__, 449, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: Duplicate token " << QLatin1String("bold") << " found in font string."; return
never executed: return currentFont;
currentFont;
never executed: return currentFont;
}
0
305 } else if (token.compare(QLatin1String("italic")) == 0
token.compare(...italic")) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
306 if (!(usedTokens & FontStyle)
!(usedTokens & FontStyle)Description
TRUEnever evaluated
FALSEnever evaluated
) { usedTokens |= FontStyle; newFont.setStyle(QFont::StyleItalic); }
never executed: end of block
else { QMessageLogger(__FILE__, 451, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: Duplicate token " << QLatin1String("italic") << " found in font string."; return
never executed: return currentFont;
currentFont;
never executed: return currentFont;
}
0
307 } else if (token.compare(QLatin1String("oblique")) == 0
token.compare(...blique")) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
308 if (!(usedTokens & FontStyle)
!(usedTokens & FontStyle)Description
TRUEnever evaluated
FALSEnever evaluated
) { usedTokens |= FontStyle; newFont.setStyle(QFont::StyleOblique); }
never executed: end of block
else { QMessageLogger(__FILE__, 453, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: Duplicate token " << QLatin1String("oblique") << " found in font string."; return
never executed: return currentFont;
currentFont;
never executed: return currentFont;
}
0
309 } else if (token.compare(QLatin1String("small-caps")) == 0
token.compare(...l-caps")) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
310 if (!(usedTokens & FontVariant)
!(usedTokens & FontVariant)Description
TRUEnever evaluated
FALSEnever evaluated
) { usedTokens |= FontVariant; newFont.setCapitalization(QFont::SmallCaps); }
never executed: end of block
else { QMessageLogger(__FILE__, 455, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: Duplicate token " << QLatin1String("small-caps") << " found in font string."; return
never executed: return currentFont;
currentFont;
never executed: return currentFont;
}
0
311 } else {-
312 bool conversionOk = false;-
313 int weight = token.toInt(&conversionOk);-
314 if (conversionOk
conversionOkDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
315 if (weight >= 0
weight >= 0Description
TRUEnever evaluated
FALSEnever evaluated
&& weight <= 99
weight <= 99Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
316 if (!(usedTokens & FontWeight)
!(usedTokens & FontWeight)Description
TRUEnever evaluated
FALSEnever evaluated
) { usedTokens |= FontWeight; newFont.setWeight(weight); }
never executed: end of block
else { QMessageLogger(__FILE__, 461, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: Duplicate token " << QLatin1String("<font-weight>") << " found in font string."; return
never executed: return currentFont;
currentFont;
never executed: return currentFont;
}
0
317 continue;
never executed: continue;
0
318 } else {-
319 QMessageLogger(__FILE__, 464, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: Invalid font weight " << weight << " found in font string; "-
320 << "must be between 0 and 99, inclusive.";-
321 return
never executed: return currentFont;
currentFont;
never executed: return currentFont;
0
322 }-
323 }-
324-
325 QMessageLogger(__FILE__, 470, __PRETTY_FUNCTION__).warning().nospace() << "Context2D: Invalid or misplaced token " << token << " found in font string.";-
326 return
never executed: return currentFont;
currentFont;
never executed: return currentFont;
0
327 }-
328 }-
329 return
never executed: return newFont;
newFont;
never executed: return newFont;
0
330}-
331-
332class QQuickContext2DEngineData : public QV8Engine::Deletable-
333{-
334public:-
335 QQuickContext2DEngineData(QV4::ExecutionEngine *engine);-
336 ~QQuickContext2DEngineData();-
337-
338 QV4::PersistentValue contextPrototype;-
339 QV4::PersistentValue gradientProto;-
340 QV4::PersistentValue pixelArrayProto;-
341};-
342-
343static inline QQuickContext2DEngineData *engineData(QV4::ExecutionEngine *engine) { static int extensionId = -1; if (extensionId == -1
extensionId == -1Description
TRUEnever evaluated
FALSEnever evaluated
) { QV8Engine::registrationMutex()->lock(); if (extensionId == -1
extensionId == -1Description
TRUEnever evaluated
FALSEnever evaluated
) extensionId = QV8Engine::registerExtension();
never executed: extensionId = QV8Engine::registerExtension();
QV8Engine::registrationMutex()->unlock(); }
never executed: end of block
QQuickContext2DEngineData *rv = (QQuickContext2DEngineData *)engine->v8Engine->extensionData(extensionId); if (!rv
!rvDescription
TRUEnever evaluated
FALSEnever evaluated
) { rv = new QQuickContext2DEngineData(engine); engine->v8Engine->setExtensionData(extensionId, rv); }
never executed: end of block
return
never executed: return rv;
rv;
never executed: return rv;
}
0
344-
345namespace QV4 {-
346namespace Heap {-
347-
348struct QQuickJSContext2D : Object {-
349 void init() { Object::init(); }
never executed: end of block
0
350 QQuickContext2D* context;-
351};-
352-
353struct QQuickJSContext2DPrototype : Object {-
354 void init() { Object::init(); }
never executed: end of block
0
355};-
356-
357struct QQuickContext2DStyle : Object {-
358 void init()-
359 {-
360 brush = new QBrush;-
361 patternRepeatX = false;-
362 patternRepeatY = false;-
363 }
never executed: end of block
0
364 void destroy() {-
365 delete brush;-
366 Object::destroy();-
367 }
never executed: end of block
0
368-
369 QBrush *brush;-
370 bool patternRepeatX:1;-
371 bool patternRepeatY:1;-
372};-
373-
374struct QQuickJSContext2DPixelData : Object {-
375 void init();-
376 void destroy() {-
377 delete image;-
378 Object::destroy();-
379 }
never executed: end of block
0
380-
381 QImage *image;-
382};-
383-
384struct QQuickJSContext2DImageData : Object {-
385 void init();-
386-
387 static void markObjects(QV4::Heap::Base *that, QV4::MarkStack *markStack) {-
388 static_cast<QQuickJSContext2DImageData *>(that)->pixelData.mark(markStack);-
389 Object::markObjects(that, markStack);-
390 }
never executed: end of block
0
391-
392 QV4::Value pixelData;-
393};-
394-
395}-
396}-
397-
398struct QQuickJSContext2D : public QV4::Object-
399{-
400 private: QQuickJSContext2D() = delete; QQuickJSContext2D(const QQuickJSContext2D &) = delete; QQuickJSContext2D &operator=(const QQuickJSContext2D &) = delete; public: template <typename Type> inline void qt_check_for_QMANAGED_macro(const Type *_q_argument) const { int i = qYouForgotTheQ_MANAGED_Macro(this, _q_argument); i = i + 1; }
never executed: end of block
typedef QV4::Heap::QQuickJSContext2D Data; typedef QV4::Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { return
never executed: return &static_vtbl;
&static_vtbl;
never executed: return &static_vtbl;
} void __dataTest() { static_assert (sizeof(*this) == sizeof(Managed), "Classes derived from Managed can't have own data members."); }
never executed: end of block
QV4::Heap::QQuickJSContext2D *d_unchecked() const { return
never executed: return static_cast<QV4::Heap::QQuickJSContext2D *>(m());
static_cast<QV4::Heap::QQuickJSContext2D *>(m());
never executed: return static_cast<QV4::Heap::QQuickJSContext2D *>(m());
} QV4::Heap::QQuickJSContext2D *d() const { QV4::Heap::QQuickJSContext2D *dptr = d_unchecked(); dptr->_checkIsInitialized(); return
never executed: return dptr;
dptr;
never executed: return dptr;
} static_assert(bool(std::is_trivial< QV4::Heap::QQuickJSContext2D >::value), "std::is_trivial< QV4::Heap::QQuickJSContext2D >::value");
0
401-
402 static QV4::ReturnedValue method_get_globalAlpha(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
403 static QV4::ReturnedValue method_set_globalAlpha(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
404 static QV4::ReturnedValue method_get_globalCompositeOperation(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
405 static QV4::ReturnedValue method_set_globalCompositeOperation(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
406 static QV4::ReturnedValue method_get_fillStyle(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
407 static QV4::ReturnedValue method_set_fillStyle(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
408 static QV4::ReturnedValue method_get_fillRule(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
409 static QV4::ReturnedValue method_set_fillRule(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
410 static QV4::ReturnedValue method_get_strokeStyle(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
411 static QV4::ReturnedValue method_set_strokeStyle(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
412-
413 static QV4::ReturnedValue method_get_lineCap(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
414 static QV4::ReturnedValue method_set_lineCap(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
415 static QV4::ReturnedValue method_get_lineJoin(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
416 static QV4::ReturnedValue method_set_lineJoin(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
417 static QV4::ReturnedValue method_get_lineWidth(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
418 static QV4::ReturnedValue method_set_lineWidth(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
419 static QV4::ReturnedValue method_get_miterLimit(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
420 static QV4::ReturnedValue method_set_miterLimit(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
421-
422 static QV4::ReturnedValue method_get_shadowBlur(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
423 static QV4::ReturnedValue method_set_shadowBlur(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
424 static QV4::ReturnedValue method_get_shadowColor(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
425 static QV4::ReturnedValue method_set_shadowColor(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
426 static QV4::ReturnedValue method_get_shadowOffsetX(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
427 static QV4::ReturnedValue method_set_shadowOffsetX(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
428 static QV4::ReturnedValue method_get_shadowOffsetY(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
429 static QV4::ReturnedValue method_set_shadowOffsetY(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
430-
431-
432-
433 static QV4::ReturnedValue method_get_path(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
434 static QV4::ReturnedValue method_set_path(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
435-
436 static QV4::ReturnedValue method_get_font(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
437 static QV4::ReturnedValue method_set_font(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
438 static QV4::ReturnedValue method_get_textAlign(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
439 static QV4::ReturnedValue method_set_textAlign(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
440 static QV4::ReturnedValue method_get_textBaseline(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
441 static QV4::ReturnedValue method_set_textBaseline(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
442};-
443-
444const QV4::VTable QQuickJSContext2D::static_vtbl = { (std::is_same<QQuickJSContext2D::SuperClass, Object>::value) ? nullptr : &QQuickJSContext2D::SuperClass::static_vtbl, (sizeof(QQuickJSContext2D::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(QQuickJSContext2D::Data) + (QQuickJSContext2D::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(QQuickJSContext2D::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), QQuickJSContext2D::IsExecutionContext, QQuickJSContext2D::IsString, QQuickJSContext2D::IsObject, QQuickJSContext2D::IsFunctionObject, QQuickJSContext2D::IsErrorObject, QQuickJSContext2D::IsArrayData, QQuickJSContext2D::IsStringOrSymbol, QQuickJSContext2D::MyType, { 0, 0, 0, 0 }, "QQuickJSContext2D", QQuickJSContext2D::virtualDestroy, QQuickJSContext2D::Data::markObjects, QQuickJSContext2D::virtualIsEqualTo, QQuickJSContext2D::virtualGet, QQuickJSContext2D::virtualPut, QQuickJSContext2D::virtualDeleteProperty, QQuickJSContext2D::virtualHasProperty, QQuickJSContext2D::virtualGetOwnProperty, QQuickJSContext2D::virtualDefineOwnProperty, QQuickJSContext2D::virtualIsExtensible, QQuickJSContext2D::virtualPreventExtensions, QQuickJSContext2D::virtualGetPrototypeOf, QQuickJSContext2D::virtualSetPrototypeOf, QQuickJSContext2D::virtualGetLength, QQuickJSContext2D::virtualAdvanceIterator, QQuickJSContext2D::virtualInstanceOf, QQuickJSContext2D::virtualCall, QQuickJSContext2D::virtualCallAsConstructor, };-
445-
446-
447struct QQuickJSContext2DPrototype : public QV4::Object-
448{-
449 private: QQuickJSContext2DPrototype() = delete; QQuickJSContext2DPrototype(const QQuickJSContext2DPrototype &) = delete; QQuickJSContext2DPrototype &operator=(const QQuickJSContext2DPrototype &) = delete; public: template <typename Type> inline void qt_check_for_QMANAGED_macro(const Type *_q_argument) const { int i = qYouForgotTheQ_MANAGED_Macro(this, _q_argument); i = i + 1; }
never executed: end of block
typedef QV4::Heap::QQuickJSContext2DPrototype Data; typedef QV4::Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { return
never executed: return &static_vtbl;
&static_vtbl;
never executed: return &static_vtbl;
} void __dataTest() { static_assert (sizeof(*this) == sizeof(Managed), "Classes derived from Managed can't have own data members."); }
never executed: end of block
QV4::Heap::QQuickJSContext2DPrototype *d_unchecked() const { return
never executed: return static_cast<QV4::Heap::QQuickJSContext2DPrototype *>(m());
static_cast<QV4::Heap::QQuickJSContext2DPrototype *>(m());
never executed: return static_cast<QV4::Heap::QQuickJSContext2DPrototype *>(m());
} QV4::Heap::QQuickJSContext2DPrototype *d() const { QV4::Heap::QQuickJSContext2DPrototype *dptr = d_unchecked(); dptr->_checkIsInitialized(); return
never executed: return dptr;
dptr;
never executed: return dptr;
} static_assert(bool(std::is_trivial< QV4::Heap::QQuickJSContext2DPrototype >::value), "std::is_trivial< QV4::Heap::QQuickJSContext2DPrototype >::value");
0
450public:-
451 static QV4::Heap::QQuickJSContext2DPrototype *create(QV4::ExecutionEngine *engine)-
452 {-
453 QV4::Scope scope(engine);-
454 QV4::Scoped<QQuickJSContext2DPrototype> o(scope, engine->memoryManager->allocate<QQuickJSContext2DPrototype>());-
455-
456 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "quadraticCurveTo")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "quadraticCurveTo" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_quadraticCurveTo, 0);
0
457 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "restore")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "restore" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_restore, 0);
0
458 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "moveTo")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "moveTo" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_moveTo, 0);
0
459 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "lineTo")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "lineTo" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_lineTo, 0);
0
460 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "caretBlinkRate")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "caretBlinkRate" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_caretBlinkRate, 0);
0
461 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "clip")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "clip" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_clip, 0);
0
462 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "setTransform")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "setTransform" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_setTransform, 0);
0
463 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "text")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "text" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_text, 0);
0
464 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "roundedRect")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "roundedRect" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_roundedRect, 0);
0
465 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "createPattern")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "createPattern" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_createPattern, 0);
0
466 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "stroke")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "stroke" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_stroke, 0);
0
467 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "arc")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "arc" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_arc, 0);
0
468 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "createImageData")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "createImageData" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_createImageData, 0);
0
469 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "measureText")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "measureText" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_measureText, 0);
0
470 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "ellipse")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "ellipse" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_ellipse, 0);
0
471 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "fill")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fill" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_fill, 0);
0
472 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "save")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "save" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_save, 0);
0
473 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "scale")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "scale" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_scale, 0);
0
474 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "drawImage")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "drawImage" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_drawImage, 0);
0
475 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "transform")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "transform" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_transform, 0);
0
476 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "fillText")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fillText" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_fillText, 0);
0
477 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "strokeText")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "strokeText" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_strokeText, 0);
0
478 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "translate")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "translate" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_translate, 0);
0
479 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "createRadialGradient")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "createRadialGradient" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_createRadialGradient, 0);
0
480 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "shear")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "shear" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_shear, 0);
0
481 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "isPointInPath")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "isPointInPath" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_isPointInPath, 0);
0
482 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "bezierCurveTo")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "bezierCurveTo" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_bezierCurveTo, 0);
0
483 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "resetTransform")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "resetTransform" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_resetTransform, 0);
0
484 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "arcTo")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "arcTo" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_arcTo, 0);
0
485 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "fillRect")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "fillRect" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_fillRect, 0);
0
486 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "createConicalGradient")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "createConicalGradient" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_createConicalGradient, 0);
0
487 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "drawFocusRing")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "drawFocusRing" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_drawFocusRing, 0);
0
488 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "beginPath")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "beginPath" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_beginPath, 0);
0
489 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "clearRect")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "clearRect" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_clearRect, 0);
0
490 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "rect")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "rect" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_rect, 0);
0
491 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "reset")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "reset" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_reset, 0);
0
492 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "rotate")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "rotate" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_rotate, 0);
0
493 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "setCaretSelectionRect")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "setCaretSelectionRect" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_setCaretSelectionRect, 0);
0
494 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "putImageData")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "putImageData" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_putImageData, 0);
0
495 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "getImageData")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "getImageData" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_getImageData, 0);
0
496 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "createLinearGradient")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "createLinearGradient" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_createLinearGradient, 0);
0
497 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "strokeRect")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "strokeRect" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_strokeRect, 0);
0
498 o->defineDefaultProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "closePath")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "closePath" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), method_closePath, 0);
0
499 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "canvas")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "canvas" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), QQuickJSContext2DPrototype::method_get_canvas, nullptr);
0
500-
501 return
never executed: return o->d();
o->d();
never executed: return o->d();
0
502 }-
503-
504 static QV4::ReturnedValue method_get_canvas(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
505 static QV4::ReturnedValue method_restore(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
506 static QV4::ReturnedValue method_reset(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
507 static QV4::ReturnedValue method_save(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
508 static QV4::ReturnedValue method_rotate(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
509 static QV4::ReturnedValue method_scale(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
510 static QV4::ReturnedValue method_translate(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
511 static QV4::ReturnedValue method_setTransform(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
512 static QV4::ReturnedValue method_transform(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
513 static QV4::ReturnedValue method_resetTransform(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
514 static QV4::ReturnedValue method_shear(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
515 static QV4::ReturnedValue method_createLinearGradient(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
516 static QV4::ReturnedValue method_createRadialGradient(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
517 static QV4::ReturnedValue method_createConicalGradient(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
518 static QV4::ReturnedValue method_createPattern(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
519 static QV4::ReturnedValue method_clearRect(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
520 static QV4::ReturnedValue method_fillRect(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
521 static QV4::ReturnedValue method_strokeRect(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
522 static QV4::ReturnedValue method_arc(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
523 static QV4::ReturnedValue method_arcTo(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
524 static QV4::ReturnedValue method_beginPath(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
525 static QV4::ReturnedValue method_bezierCurveTo(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
526 static QV4::ReturnedValue method_clip(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
527 static QV4::ReturnedValue method_closePath(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
528 static QV4::ReturnedValue method_fill(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
529 static QV4::ReturnedValue method_lineTo(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
530 static QV4::ReturnedValue method_moveTo(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
531 static QV4::ReturnedValue method_quadraticCurveTo(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
532 static QV4::ReturnedValue method_rect(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
533 static QV4::ReturnedValue method_roundedRect(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
534 static QV4::ReturnedValue method_ellipse(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
535 static QV4::ReturnedValue method_text(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
536 static QV4::ReturnedValue method_stroke(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
537 static QV4::ReturnedValue method_isPointInPath(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
538 static QV4::ReturnedValue method_drawFocusRing(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
539 static QV4::ReturnedValue method_setCaretSelectionRect(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
540 static QV4::ReturnedValue method_caretBlinkRate(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
541 static QV4::ReturnedValue method_fillText(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
542 static QV4::ReturnedValue method_strokeText(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
543 static QV4::ReturnedValue method_measureText(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
544 static QV4::ReturnedValue method_drawImage(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
545 static QV4::ReturnedValue method_createImageData(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
546 static QV4::ReturnedValue method_getImageData(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
547 static QV4::ReturnedValue method_putImageData(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
548-
549};-
550-
551const QV4::VTable QQuickJSContext2DPrototype::static_vtbl = { (std::is_same<QQuickJSContext2DPrototype::SuperClass, Object>::value) ? nullptr : &QQuickJSContext2DPrototype::SuperClass::static_vtbl, (sizeof(QQuickJSContext2DPrototype::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(QQuickJSContext2DPrototype::Data) + (QQuickJSContext2DPrototype::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(QQuickJSContext2DPrototype::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), QQuickJSContext2DPrototype::IsExecutionContext, QQuickJSContext2DPrototype::IsString, QQuickJSContext2DPrototype::IsObject, QQuickJSContext2DPrototype::IsFunctionObject, QQuickJSContext2DPrototype::IsErrorObject, QQuickJSContext2DPrototype::IsArrayData, QQuickJSContext2DPrototype::IsStringOrSymbol, QQuickJSContext2DPrototype::MyType, { 0, 0, 0, 0 }, "QQuickJSContext2DPrototype", QQuickJSContext2DPrototype::virtualDestroy, QQuickJSContext2DPrototype::Data::markObjects, QQuickJSContext2DPrototype::virtualIsEqualTo, QQuickJSContext2DPrototype::virtualGet, QQuickJSContext2DPrototype::virtualPut, QQuickJSContext2DPrototype::virtualDeleteProperty, QQuickJSContext2DPrototype::virtualHasProperty, QQuickJSContext2DPrototype::virtualGetOwnProperty, QQuickJSContext2DPrototype::virtualDefineOwnProperty, QQuickJSContext2DPrototype::virtualIsExtensible, QQuickJSContext2DPrototype::virtualPreventExtensions, QQuickJSContext2DPrototype::virtualGetPrototypeOf, QQuickJSContext2DPrototype::virtualSetPrototypeOf, QQuickJSContext2DPrototype::virtualGetLength, QQuickJSContext2DPrototype::virtualAdvanceIterator, QQuickJSContext2DPrototype::virtualInstanceOf, QQuickJSContext2DPrototype::virtualCall, QQuickJSContext2DPrototype::virtualCallAsConstructor, };-
552-
553-
554struct QQuickContext2DStyle : public QV4::Object-
555{-
556 private: QQuickContext2DStyle() = delete; QQuickContext2DStyle(const QQuickContext2DStyle &) = delete; QQuickContext2DStyle &operator=(const QQuickContext2DStyle &) = delete; public: template <typename Type> inline void qt_check_for_QMANAGED_macro(const Type *_q_argument) const { int i = qYouForgotTheQ_MANAGED_Macro(this, _q_argument); i = i + 1; }
never executed: end of block
typedef QV4::Heap::QQuickContext2DStyle Data; typedef QV4::Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { return
never executed: return &static_vtbl;
&static_vtbl;
never executed: return &static_vtbl;
} void __dataTest() { static_assert (sizeof(*this) == sizeof(Managed), "Classes derived from Managed can't have own data members."); }
never executed: end of block
QV4::Heap::QQuickContext2DStyle *d_unchecked() const { return
never executed: return static_cast<QV4::Heap::QQuickContext2DStyle *>(m());
static_cast<QV4::Heap::QQuickContext2DStyle *>(m());
never executed: return static_cast<QV4::Heap::QQuickContext2DStyle *>(m());
} QV4::Heap::QQuickContext2DStyle *d() const { QV4::Heap::QQuickContext2DStyle *dptr = d_unchecked(); dptr->_checkIsInitialized(); return
never executed: return dptr;
dptr;
never executed: return dptr;
} static_assert(bool(std::is_trivial< QV4::Heap::QQuickContext2DStyle >::value), "std::is_trivial< QV4::Heap::QQuickContext2DStyle >::value");
0
557 static void virtualDestroy(QV4::Heap::Base *b) { static_cast<Data *>(b)->destroy(); }
never executed: end of block
0
558-
559 static QV4::ReturnedValue gradient_proto_addColorStop(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
560};-
561-
562-
563-
564const QV4::VTable QQuickContext2DStyle::static_vtbl = { (std::is_same<QQuickContext2DStyle::SuperClass, Object>::value) ? nullptr : &QQuickContext2DStyle::SuperClass::static_vtbl, (sizeof(QQuickContext2DStyle::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(QQuickContext2DStyle::Data) + (QQuickContext2DStyle::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(QQuickContext2DStyle::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), QQuickContext2DStyle::IsExecutionContext, QQuickContext2DStyle::IsString, QQuickContext2DStyle::IsObject, QQuickContext2DStyle::IsFunctionObject, QQuickContext2DStyle::IsErrorObject, QQuickContext2DStyle::IsArrayData, QQuickContext2DStyle::IsStringOrSymbol, QQuickContext2DStyle::MyType, { 0, 0, 0, 0 }, "QQuickContext2DStyle", QQuickContext2DStyle::virtualDestroy, QQuickContext2DStyle::Data::markObjects, QQuickContext2DStyle::virtualIsEqualTo, QQuickContext2DStyle::virtualGet, QQuickContext2DStyle::virtualPut, QQuickContext2DStyle::virtualDeleteProperty, QQuickContext2DStyle::virtualHasProperty, QQuickContext2DStyle::virtualGetOwnProperty, QQuickContext2DStyle::virtualDefineOwnProperty, QQuickContext2DStyle::virtualIsExtensible, QQuickContext2DStyle::virtualPreventExtensions, QQuickContext2DStyle::virtualGetPrototypeOf, QQuickContext2DStyle::virtualSetPrototypeOf, QQuickContext2DStyle::virtualGetLength, QQuickContext2DStyle::virtualAdvanceIterator, QQuickContext2DStyle::virtualInstanceOf, QQuickContext2DStyle::virtualCall, QQuickContext2DStyle::virtualCallAsConstructor, };-
565-
566QImage qt_image_convolute_filter(const QImage& src, const QVector<qreal>& weights, int radius = 0)-
567{-
568-
569 int delta = radius
radiusDescription
TRUEnever evaluated
FALSEnever evaluated
? radius : qFloor(qSqrt(weights.size()) / qreal(2));
0
570 int filterDim = 2 * delta + 1;-
571-
572 QImage dst = QImage(src.size(), src.format());-
573-
574 int w = src.width();-
575 int h = src.height();-
576-
577 const QRgb *sr = (const QRgb *)(src.constBits());-
578 int srcStride = src.bytesPerLine() / 4;-
579-
580 QRgb *dr = (QRgb*)dst.bits();-
581 int dstStride = dst.bytesPerLine() / 4;-
582-
583 for (int y = 0; y < h
y < hDescription
TRUEnever evaluated
FALSEnever evaluated
; ++y) {
0
584 for (int x = 0; x < w
x < wDescription
TRUEnever evaluated
FALSEnever evaluated
; ++x) {
0
585 int red = 0;-
586 int green = 0;-
587 int blue = 0;-
588 int alpha = 0;-
589-
590 qreal redF = 0;-
591 qreal greenF = 0;-
592 qreal blueF = 0;-
593 qreal alphaF = 0;-
594-
595 int sy = y;-
596 int sx = x;-
597-
598 for (int cy = 0; cy < filterDim
cy < filterDimDescription
TRUEnever evaluated
FALSEnever evaluated
; ++cy) {
0
599 int scy = sy + cy - delta;-
600-
601 if (scy < 0
scy < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| scy >= h
scy >= hDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
602 continue;
never executed: continue;
0
603-
604 const QRgb *sry = sr + scy * srcStride;-
605-
606 for (int cx = 0; cx < filterDim
cx < filterDimDescription
TRUEnever evaluated
FALSEnever evaluated
; ++cx) {
0
607 int scx = sx + cx - delta;-
608-
609 if (scx < 0
scx < 0Description
TRUEnever evaluated
FALSEnever evaluated
|| scx >= w
scx >= wDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
610 continue;
never executed: continue;
0
611-
612 const QRgb col = sry[scx];-
613-
614 if (radius
radiusDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
615 red += qRed(col);-
616 green += qGreen(col);-
617 blue += qBlue(col);-
618 alpha += qAlpha(col);-
619 }
never executed: end of block
else {
0
620 qreal wt = weights[cy * filterDim + cx];-
621-
622 redF += qRed(col) * wt;-
623 greenF += qGreen(col) * wt;-
624 blueF += qBlue(col) * wt;-
625 alphaF += qAlpha(col) * wt;-
626 }
never executed: end of block
0
627 }-
628 }
never executed: end of block
0
629-
630 if (radius
radiusDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
631 dr[x] = qRgba(qRound(red * weights[0]), qRound(green * weights[0]), qRound(blue * weights[0]), qRound(alpha * weights[0]));
never executed: dr[x] = qRgba(qRound(red * weights[0]), qRound(green * weights[0]), qRound(blue * weights[0]), qRound(alpha * weights[0]));
0
632 else-
633 dr[x] = qRgba(qRound(redF), qRound(greenF), qRound(blueF), qRound(alphaF));
never executed: dr[x] = qRgba(qRound(redF), qRound(greenF), qRound(blueF), qRound(alphaF));
0
634 }-
635-
636 dr += dstStride;-
637 }
never executed: end of block
0
638-
639 return
never executed: return dst;
dst;
never executed: return dst;
0
640}-
641-
642void qt_image_boxblur(QImage& image, int radius, bool quality)-
643{-
644 int passes = quality
qualityDescription
TRUEnever evaluated
FALSEnever evaluated
? 3: 1;
0
645 int filterSize = 2 * radius + 1;-
646 for (int i = 0; i < passes
i < passesDescription
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
647 image = qt_image_convolute_filter(image, QVector<qreal>() << 1.0 / (filterSize * filterSize), radius);
never executed: image = qt_image_convolute_filter(image, QVector<qreal>() << 1.0 / (filterSize * filterSize), radius);
0
648}
never executed: end of block
0
649-
650static QPainter::CompositionMode qt_composite_mode_from_string(const QString &compositeOperator)-
651{-
652 if (compositeOperator == QLatin1String("source-over")
compositeOpera..."source-over")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
653 return
never executed: return QPainter::CompositionMode_SourceOver;
QPainter::CompositionMode_SourceOver;
never executed: return QPainter::CompositionMode_SourceOver;
0
654 } else if (compositeOperator == QLatin1String("source-out")
compositeOpera...("source-out")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
655 return
never executed: return QPainter::CompositionMode_SourceOut;
QPainter::CompositionMode_SourceOut;
never executed: return QPainter::CompositionMode_SourceOut;
0
656 } else if (compositeOperator == QLatin1String("source-in")
compositeOpera...g("source-in")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
657 return
never executed: return QPainter::CompositionMode_SourceIn;
QPainter::CompositionMode_SourceIn;
never executed: return QPainter::CompositionMode_SourceIn;
0
658 } else if (compositeOperator == QLatin1String("source-atop")
compositeOpera..."source-atop")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
659 return
never executed: return QPainter::CompositionMode_SourceAtop;
QPainter::CompositionMode_SourceAtop;
never executed: return QPainter::CompositionMode_SourceAtop;
0
660 } else if (compositeOperator == QLatin1String("destination-atop")
compositeOpera...ination-atop")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
661 return
never executed: return QPainter::CompositionMode_DestinationAtop;
QPainter::CompositionMode_DestinationAtop;
never executed: return QPainter::CompositionMode_DestinationAtop;
0
662 } else if (compositeOperator == QLatin1String("destination-in")
compositeOpera...stination-in")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
663 return
never executed: return QPainter::CompositionMode_DestinationIn;
QPainter::CompositionMode_DestinationIn;
never executed: return QPainter::CompositionMode_DestinationIn;
0
664 } else if (compositeOperator == QLatin1String("destination-out")
compositeOpera...tination-out")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
665 return
never executed: return QPainter::CompositionMode_DestinationOut;
QPainter::CompositionMode_DestinationOut;
never executed: return QPainter::CompositionMode_DestinationOut;
0
666 } else if (compositeOperator == QLatin1String("destination-over")
compositeOpera...ination-over")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
667 return
never executed: return QPainter::CompositionMode_DestinationOver;
QPainter::CompositionMode_DestinationOver;
never executed: return QPainter::CompositionMode_DestinationOver;
0
668 } else if (compositeOperator == QLatin1String("lighter")
compositeOpera...ing("lighter")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
669 return
never executed: return QPainter::CompositionMode_Plus;
QPainter::CompositionMode_Plus;
never executed: return QPainter::CompositionMode_Plus;
0
670 } else if (compositeOperator == QLatin1String("copy")
compositeOpera...String("copy")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
671 return
never executed: return QPainter::CompositionMode_Source;
QPainter::CompositionMode_Source;
never executed: return QPainter::CompositionMode_Source;
0
672 } else if (compositeOperator == QLatin1String("xor")
compositeOpera...1String("xor")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
673 return
never executed: return QPainter::CompositionMode_Xor;
QPainter::CompositionMode_Xor;
never executed: return QPainter::CompositionMode_Xor;
0
674 } else if (compositeOperator == QLatin1String("qt-clear")
compositeOpera...ng("qt-clear")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
675 return
never executed: return QPainter::CompositionMode_Clear;
QPainter::CompositionMode_Clear;
never executed: return QPainter::CompositionMode_Clear;
0
676 } else if (compositeOperator == QLatin1String("qt-destination")
compositeOpera...-destination")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
677 return
never executed: return QPainter::CompositionMode_Destination;
QPainter::CompositionMode_Destination;
never executed: return QPainter::CompositionMode_Destination;
0
678 } else if (compositeOperator == QLatin1String("qt-multiply")
compositeOpera..."qt-multiply")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
679 return
never executed: return QPainter::CompositionMode_Multiply;
QPainter::CompositionMode_Multiply;
never executed: return QPainter::CompositionMode_Multiply;
0
680 } else if (compositeOperator == QLatin1String("qt-screen")
compositeOpera...g("qt-screen")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
681 return
never executed: return QPainter::CompositionMode_Screen;
QPainter::CompositionMode_Screen;
never executed: return QPainter::CompositionMode_Screen;
0
682 } else if (compositeOperator == QLatin1String("qt-overlay")
compositeOpera...("qt-overlay")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
683 return
never executed: return QPainter::CompositionMode_Overlay;
QPainter::CompositionMode_Overlay;
never executed: return QPainter::CompositionMode_Overlay;
0
684 } else if (compositeOperator == QLatin1String("qt-darken")
compositeOpera...g("qt-darken")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
685 return
never executed: return QPainter::CompositionMode_Darken;
QPainter::CompositionMode_Darken;
never executed: return QPainter::CompositionMode_Darken;
0
686 } else if (compositeOperator == QLatin1String("qt-lighten")
compositeOpera...("qt-lighten")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
687 return
never executed: return QPainter::CompositionMode_Lighten;
QPainter::CompositionMode_Lighten;
never executed: return QPainter::CompositionMode_Lighten;
0
688 } else if (compositeOperator == QLatin1String("qt-color-dodge")
compositeOpera...-color-dodge")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
689 return
never executed: return QPainter::CompositionMode_ColorDodge;
QPainter::CompositionMode_ColorDodge;
never executed: return QPainter::CompositionMode_ColorDodge;
0
690 } else if (compositeOperator == QLatin1String("qt-color-burn")
compositeOpera...t-color-burn")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
691 return
never executed: return QPainter::CompositionMode_ColorBurn;
QPainter::CompositionMode_ColorBurn;
never executed: return QPainter::CompositionMode_ColorBurn;
0
692 } else if (compositeOperator == QLatin1String("qt-hard-light")
compositeOpera...t-hard-light")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
693 return
never executed: return QPainter::CompositionMode_HardLight;
QPainter::CompositionMode_HardLight;
never executed: return QPainter::CompositionMode_HardLight;
0
694 } else if (compositeOperator == QLatin1String("qt-soft-light")
compositeOpera...t-soft-light")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
695 return
never executed: return QPainter::CompositionMode_SoftLight;
QPainter::CompositionMode_SoftLight;
never executed: return QPainter::CompositionMode_SoftLight;
0
696 } else if (compositeOperator == QLatin1String("qt-difference")
compositeOpera...t-difference")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
697 return
never executed: return QPainter::CompositionMode_Difference;
QPainter::CompositionMode_Difference;
never executed: return QPainter::CompositionMode_Difference;
0
698 } else if (compositeOperator == QLatin1String("qt-exclusion")
compositeOpera...qt-exclusion")Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
699 return
never executed: return QPainter::CompositionMode_Exclusion;
QPainter::CompositionMode_Exclusion;
never executed: return QPainter::CompositionMode_Exclusion;
0
700 }-
701 return
never executed: return QPainter::CompositionMode_SourceOver;
QPainter::CompositionMode_SourceOver;
never executed: return QPainter::CompositionMode_SourceOver;
0
702}-
703-
704static QString qt_composite_mode_to_string(QPainter::CompositionMode op)-
705{-
706 switch (op) {-
707 case
never executed: case QPainter::CompositionMode_SourceOver:
QPainter::CompositionMode_SourceOver:
never executed: case QPainter::CompositionMode_SourceOver:
0
708 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "source-over")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "source-over" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
709 case
never executed: case QPainter::CompositionMode_DestinationOver:
QPainter::CompositionMode_DestinationOver:
never executed: case QPainter::CompositionMode_DestinationOver:
code before this statement never executed: case QPainter::CompositionMode_DestinationOver:
0
710 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "destination-over")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "destination-over" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
711 case
never executed: case QPainter::CompositionMode_Clear:
QPainter::CompositionMode_Clear:
never executed: case QPainter::CompositionMode_Clear:
code before this statement never executed: case QPainter::CompositionMode_Clear:
0
712 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "qt-clear")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "qt-clear" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
713 case
never executed: case QPainter::CompositionMode_Source:
QPainter::CompositionMode_Source:
never executed: case QPainter::CompositionMode_Source:
code before this statement never executed: case QPainter::CompositionMode_Source:
0
714 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "copy")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "copy" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
715 case
never executed: case QPainter::CompositionMode_Destination:
QPainter::CompositionMode_Destination:
never executed: case QPainter::CompositionMode_Destination:
code before this statement never executed: case QPainter::CompositionMode_Destination:
0
716 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "qt-destination")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "qt-destination" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
717 case
never executed: case QPainter::CompositionMode_SourceIn:
QPainter::CompositionMode_SourceIn:
never executed: case QPainter::CompositionMode_SourceIn:
code before this statement never executed: case QPainter::CompositionMode_SourceIn:
0
718 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "source-in")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "source-in" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
719 case
never executed: case QPainter::CompositionMode_DestinationIn:
QPainter::CompositionMode_DestinationIn:
never executed: case QPainter::CompositionMode_DestinationIn:
code before this statement never executed: case QPainter::CompositionMode_DestinationIn:
0
720 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "destination-in")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "destination-in" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
721 case
never executed: case QPainter::CompositionMode_SourceOut:
QPainter::CompositionMode_SourceOut:
never executed: case QPainter::CompositionMode_SourceOut:
code before this statement never executed: case QPainter::CompositionMode_SourceOut:
0
722 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "source-out")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "source-out" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
723 case
never executed: case QPainter::CompositionMode_DestinationOut:
QPainter::CompositionMode_DestinationOut:
never executed: case QPainter::CompositionMode_DestinationOut:
code before this statement never executed: case QPainter::CompositionMode_DestinationOut:
0
724 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "destination-out")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "destination-out" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
725 case
never executed: case QPainter::CompositionMode_SourceAtop:
QPainter::CompositionMode_SourceAtop:
never executed: case QPainter::CompositionMode_SourceAtop:
code before this statement never executed: case QPainter::CompositionMode_SourceAtop:
0
726 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "source-atop")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "source-atop" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
727 case
never executed: case QPainter::CompositionMode_DestinationAtop:
QPainter::CompositionMode_DestinationAtop:
never executed: case QPainter::CompositionMode_DestinationAtop:
code before this statement never executed: case QPainter::CompositionMode_DestinationAtop:
0
728 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "destination-atop")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "destination-atop" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
729 case
never executed: case QPainter::CompositionMode_Xor:
QPainter::CompositionMode_Xor:
never executed: case QPainter::CompositionMode_Xor:
code before this statement never executed: case QPainter::CompositionMode_Xor:
0
730 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "xor")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "xor" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
731 case
never executed: case QPainter::CompositionMode_Plus:
QPainter::CompositionMode_Plus:
never executed: case QPainter::CompositionMode_Plus:
code before this statement never executed: case QPainter::CompositionMode_Plus:
0
732 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "lighter")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "lighter" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
733 case
never executed: case QPainter::CompositionMode_Multiply:
QPainter::CompositionMode_Multiply:
never executed: case QPainter::CompositionMode_Multiply:
code before this statement never executed: case QPainter::CompositionMode_Multiply:
0
734 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "qt-multiply")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "qt-multiply" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
735 case
never executed: case QPainter::CompositionMode_Screen:
QPainter::CompositionMode_Screen:
never executed: case QPainter::CompositionMode_Screen:
code before this statement never executed: case QPainter::CompositionMode_Screen:
0
736 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "qt-screen")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "qt-screen" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
737 case
never executed: case QPainter::CompositionMode_Overlay:
QPainter::CompositionMode_Overlay:
never executed: case QPainter::CompositionMode_Overlay:
code before this statement never executed: case QPainter::CompositionMode_Overlay:
0
738 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "qt-overlay")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "qt-overlay" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
739 case
never executed: case QPainter::CompositionMode_Darken:
QPainter::CompositionMode_Darken:
never executed: case QPainter::CompositionMode_Darken:
code before this statement never executed: case QPainter::CompositionMode_Darken:
0
740 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "qt-darken")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "qt-darken" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
741 case
never executed: case QPainter::CompositionMode_Lighten:
QPainter::CompositionMode_Lighten:
never executed: case QPainter::CompositionMode_Lighten:
code before this statement never executed: case QPainter::CompositionMode_Lighten:
0
742 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "lighter")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "lighter" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
743 case
never executed: case QPainter::CompositionMode_ColorDodge:
QPainter::CompositionMode_ColorDodge:
never executed: case QPainter::CompositionMode_ColorDodge:
code before this statement never executed: case QPainter::CompositionMode_ColorDodge:
0
744 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "qt-color-dodge")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "qt-color-dodge" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
745 case
never executed: case QPainter::CompositionMode_ColorBurn:
QPainter::CompositionMode_ColorBurn:
never executed: case QPainter::CompositionMode_ColorBurn:
code before this statement never executed: case QPainter::CompositionMode_ColorBurn:
0
746 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "qt-color-burn")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "qt-color-burn" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
747 case
never executed: case QPainter::CompositionMode_HardLight:
QPainter::CompositionMode_HardLight:
never executed: case QPainter::CompositionMode_HardLight:
code before this statement never executed: case QPainter::CompositionMode_HardLight:
0
748 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "qt-hard-light")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "qt-hard-light" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
749 case
never executed: case QPainter::CompositionMode_SoftLight:
QPainter::CompositionMode_SoftLight:
never executed: case QPainter::CompositionMode_SoftLight:
code before this statement never executed: case QPainter::CompositionMode_SoftLight:
0
750 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "qt-soft-light")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "qt-soft-light" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
751 case
never executed: case QPainter::CompositionMode_Difference:
QPainter::CompositionMode_Difference:
never executed: case QPainter::CompositionMode_Difference:
code before this statement never executed: case QPainter::CompositionMode_Difference:
0
752 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "qt-difference")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "qt-difference" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
753 case
never executed: case QPainter::CompositionMode_Exclusion:
QPainter::CompositionMode_Exclusion:
never executed: case QPainter::CompositionMode_Exclusion:
code before this statement never executed: case QPainter::CompositionMode_Exclusion:
0
754 return ([]() noexcept -> QString { enum { Size = sizeof(u"" "qt-exclusion")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "qt-exclusion" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return qstring_literal_temp; }());-
755 default
never executed: default:
:
never executed: default:
code before this statement never executed: default:
0
756 break;
never executed: break;
0
757 }-
758 return
never executed: return QString();
QString();
never executed: return QString();
0
759}-
760-
761struct QQuickJSContext2DPixelData : public QV4::Object-
762{-
763 private: QQuickJSContext2DPixelData() = delete; QQuickJSContext2DPixelData(const QQuickJSContext2DPixelData &) = delete; QQuickJSContext2DPixelData &operator=(const QQuickJSContext2DPixelData &) = delete; public: template <typename Type> inline void qt_check_for_QMANAGED_macro(const Type *_q_argument) const { int i = qYouForgotTheQ_MANAGED_Macro(this, _q_argument); i = i + 1; }
never executed: end of block
typedef QV4::Heap::QQuickJSContext2DPixelData Data; typedef QV4::Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { return
never executed: return &static_vtbl;
&static_vtbl;
never executed: return &static_vtbl;
} void __dataTest() { static_assert (sizeof(*this) == sizeof(Managed), "Classes derived from Managed can't have own data members."); }
never executed: end of block
QV4::Heap::QQuickJSContext2DPixelData *d_unchecked() const { return
never executed: return static_cast<QV4::Heap::QQuickJSContext2DPixelData *>(m());
static_cast<QV4::Heap::QQuickJSContext2DPixelData *>(m());
never executed: return static_cast<QV4::Heap::QQuickJSContext2DPixelData *>(m());
} QV4::Heap::QQuickJSContext2DPixelData *d() const { QV4::Heap::QQuickJSContext2DPixelData *dptr = d_unchecked(); dptr->_checkIsInitialized(); return
never executed: return dptr;
dptr;
never executed: return dptr;
} static_assert(bool(std::is_trivial< QV4::Heap::QQuickJSContext2DPixelData >::value), "std::is_trivial< QV4::Heap::QQuickJSContext2DPixelData >::value");
0
764 static void virtualDestroy(QV4::Heap::Base *b) { static_cast<Data *>(b)->destroy(); }
never executed: end of block
0
765-
766 static QV4::ReturnedValue virtualGet(const QV4::Managed *m, QV4::PropertyKey id, const QV4::Value *receiver, bool *hasProperty);-
767 static bool virtualPut(QV4::Managed *m, QV4::PropertyKey id, const QV4::Value &value, Value *receiver);-
768-
769 static QV4::ReturnedValue proto_get_length(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
770};-
771-
772void QV4::Heap::QQuickJSContext2DPixelData::init()-
773{-
774 Object::init();-
775 image = new QImage;-
776 QV4::Scope scope(internalClass->engine);-
777 QV4::ScopedObject o(scope, this);-
778 o->setArrayType(QV4::Heap::ArrayData::Custom);-
779}
never executed: end of block
0
780-
781const QV4::VTable QQuickJSContext2DPixelData::static_vtbl = { (std::is_same<QQuickJSContext2DPixelData::SuperClass, Object>::value) ? nullptr : &QQuickJSContext2DPixelData::SuperClass::static_vtbl, (sizeof(QQuickJSContext2DPixelData::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(QQuickJSContext2DPixelData::Data) + (QQuickJSContext2DPixelData::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(QQuickJSContext2DPixelData::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), QQuickJSContext2DPixelData::IsExecutionContext, QQuickJSContext2DPixelData::IsString, QQuickJSContext2DPixelData::IsObject, QQuickJSContext2DPixelData::IsFunctionObject, QQuickJSContext2DPixelData::IsErrorObject, QQuickJSContext2DPixelData::IsArrayData, QQuickJSContext2DPixelData::IsStringOrSymbol, QQuickJSContext2DPixelData::MyType, { 0, 0, 0, 0 }, "QQuickJSContext2DPixelData", QQuickJSContext2DPixelData::virtualDestroy, QQuickJSContext2DPixelData::Data::markObjects, QQuickJSContext2DPixelData::virtualIsEqualTo, QQuickJSContext2DPixelData::virtualGet, QQuickJSContext2DPixelData::virtualPut, QQuickJSContext2DPixelData::virtualDeleteProperty, QQuickJSContext2DPixelData::virtualHasProperty, QQuickJSContext2DPixelData::virtualGetOwnProperty, QQuickJSContext2DPixelData::virtualDefineOwnProperty, QQuickJSContext2DPixelData::virtualIsExtensible, QQuickJSContext2DPixelData::virtualPreventExtensions, QQuickJSContext2DPixelData::virtualGetPrototypeOf, QQuickJSContext2DPixelData::virtualSetPrototypeOf, QQuickJSContext2DPixelData::virtualGetLength, QQuickJSContext2DPixelData::virtualAdvanceIterator, QQuickJSContext2DPixelData::virtualInstanceOf, QQuickJSContext2DPixelData::virtualCall, QQuickJSContext2DPixelData::virtualCallAsConstructor, };-
782-
783struct QQuickJSContext2DImageData : public QV4::Object-
784{-
785 private: QQuickJSContext2DImageData() = delete; QQuickJSContext2DImageData(const QQuickJSContext2DImageData &) = delete; QQuickJSContext2DImageData &operator=(const QQuickJSContext2DImageData &) = delete; public: template <typename Type> inline void qt_check_for_QMANAGED_macro(const Type *_q_argument) const { int i = qYouForgotTheQ_MANAGED_Macro(this, _q_argument); i = i + 1; }
never executed: end of block
typedef QV4::Heap::QQuickJSContext2DImageData Data; typedef QV4::Object SuperClass; static const QV4::VTable static_vtbl; static inline const QV4::VTable *staticVTable() { return
never executed: return &static_vtbl;
&static_vtbl;
never executed: return &static_vtbl;
} void __dataTest() { static_assert (sizeof(*this) == sizeof(Managed), "Classes derived from Managed can't have own data members."); }
never executed: end of block
QV4::Heap::QQuickJSContext2DImageData *d_unchecked() const { return
never executed: return static_cast<QV4::Heap::QQuickJSContext2DImageData *>(m());
static_cast<QV4::Heap::QQuickJSContext2DImageData *>(m());
never executed: return static_cast<QV4::Heap::QQuickJSContext2DImageData *>(m());
} QV4::Heap::QQuickJSContext2DImageData *d() const { QV4::Heap::QQuickJSContext2DImageData *dptr = d_unchecked(); dptr->_checkIsInitialized(); return
never executed: return dptr;
dptr;
never executed: return dptr;
} static_assert(bool(std::is_trivial< QV4::Heap::QQuickJSContext2DImageData >::value), "std::is_trivial< QV4::Heap::QQuickJSContext2DImageData >::value");
0
786-
787 static QV4::ReturnedValue method_get_width(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
788 static QV4::ReturnedValue method_get_height(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
789 static QV4::ReturnedValue method_get_data(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc);-
790-
791};-
792-
793void QV4::Heap::QQuickJSContext2DImageData::init()-
794{-
795 Object::init();-
796 pixelData = QV4::Primitive::undefinedValue();-
797-
798 QV4::Scope scope(internalClass->engine);-
799 QV4::ScopedObject o(scope, this);-
800-
801 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "width")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "width" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), ::QQuickJSContext2DImageData::method_get_width, nullptr);
0
802 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "height")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "height" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), ::QQuickJSContext2DImageData::method_get_height, nullptr);
0
803 o->defineAccessorProperty(([]() noexcept -> QString { enum { Size = sizeof(u"" "data")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "data" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
never executed: return qstring_literal_temp;
qstring_literal_temp;
never executed: return qstring_literal_temp;
}()), ::QQuickJSContext2DImageData::method_get_data, nullptr);
0
804}
never executed: end of block
0
805-
806const QV4::VTable QQuickJSContext2DImageData::static_vtbl = { (std::is_same<QQuickJSContext2DImageData::SuperClass, Object>::value) ? nullptr : &QQuickJSContext2DImageData::SuperClass::static_vtbl, (sizeof(QQuickJSContext2DImageData::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), (sizeof(QQuickJSContext2DImageData::Data) + (QQuickJSContext2DImageData::NInlineProperties*sizeof(QV4::Value)) + QV4::Chunk::SlotSize - 1)/QV4::Chunk::SlotSize*QV4::Chunk::SlotSize/sizeof(QV4::Value) - (sizeof(QQuickJSContext2DImageData::Data) + sizeof(QV4::Value) - 1)/sizeof(QV4::Value), QQuickJSContext2DImageData::IsExecutionContext, QQuickJSContext2DImageData::IsString, QQuickJSContext2DImageData::IsObject, QQuickJSContext2DImageData::IsFunctionObject, QQuickJSContext2DImageData::IsErrorObject, QQuickJSContext2DImageData::IsArrayData, QQuickJSContext2DImageData::IsStringOrSymbol, QQuickJSContext2DImageData::MyType, { 0, 0, 0, 0 }, "QQuickJSContext2DImageData", QQuickJSContext2DImageData::virtualDestroy, QQuickJSContext2DImageData::Data::markObjects, QQuickJSContext2DImageData::virtualIsEqualTo, QQuickJSContext2DImageData::virtualGet, QQuickJSContext2DImageData::virtualPut, QQuickJSContext2DImageData::virtualDeleteProperty, QQuickJSContext2DImageData::virtualHasProperty, QQuickJSContext2DImageData::virtualGetOwnProperty, QQuickJSContext2DImageData::virtualDefineOwnProperty, QQuickJSContext2DImageData::virtualIsExtensible, QQuickJSContext2DImageData::virtualPreventExtensions, QQuickJSContext2DImageData::virtualGetPrototypeOf, QQuickJSContext2DImageData::virtualSetPrototypeOf, QQuickJSContext2DImageData::virtualGetLength, QQuickJSContext2DImageData::virtualAdvanceIterator, QQuickJSContext2DImageData::virtualInstanceOf, QQuickJSContext2DImageData::virtualCall, QQuickJSContext2DImageData::virtualCallAsConstructor, };-
807-
808static QV4::ReturnedValue qt_create_image_data(qreal w, qreal h, QV4::ExecutionEngine *v4, const QImage& image)-
809{-
810 QV4::Scope scope(v4);-
811 QQuickContext2DEngineData *ed = engineData(scope.engine);-
812 QV4::Scoped<QQuickJSContext2DPixelData> pixelData(scope, scope.engine->memoryManager->allocate<QQuickJSContext2DPixelData>());-
813 QV4::ScopedObject p(scope, ed->pixelArrayProto.value());-
814 pixelData->setPrototypeOf(p);-
815-
816 if (image.isNull()
image.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
817 *pixelData->d()->image = QImage(w, h, QImage::Format_ARGB32);-
818 pixelData->d()->image->fill(0x00000000);-
819 }
never executed: end of block
else {
0
820 ((image.width()== qRound(w * image.devicePixelRatio()) && image.height() == qRound(h * image.devicePixelRatio())) ? static_cast<void>(0) : qt_assert("image.width()== qRound(w * image.devicePixelRatio()) && image.height() == qRound(h * image.devicePixelRatio())", __FILE__, 965));-
821 *pixelData->d()->image = image.format() == QImage::Format_ARGB32
image.format()...:Format_ARGB32Description
TRUEnever evaluated
FALSEnever evaluated
? image : image.convertToFormat(QImage::Format_ARGB32);
0
822 }
never executed: end of block
0
823-
824 QV4::Scoped<QQuickJSContext2DImageData> imageData(scope, scope.engine->memoryManager->allocate<QQuickJSContext2DImageData>());-
825 imageData->d()->pixelData = pixelData.asReturnedValue();-
826 return
never executed: return imageData.asReturnedValue();
imageData.asReturnedValue();
never executed: return imageData.asReturnedValue();
0
827}-
828QV4::ReturnedValue QQuickJSContext2DPrototype::method_get_canvas(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
829{-
830 QV4::Scope scope(b);-
831 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
832 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
833-
834 return
never executed: return QV4::Encode(QV4::QObjectWrapper::wrap(scope.engine, r->d()->context->canvas()));
QV4::Encode(QV4::QObjectWrapper::wrap(scope.engine, r->d()->context->canvas()));
never executed: return QV4::Encode(QV4::QObjectWrapper::wrap(scope.engine, r->d()->context->canvas()));
0
835}-
836-
837-
838-
839-
840-
841-
842-
843QV4::ReturnedValue QQuickJSContext2DPrototype::method_restore(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
844{-
845 QV4::Scope scope(b);-
846 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
847 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
848-
849 r->d()->context->popState();-
850 return
never executed: return QV4::Encode(thisObject->asReturnedValue());
QV4::Encode(thisObject->asReturnedValue());
never executed: return QV4::Encode(thisObject->asReturnedValue());
0
851}-
852-
853-
854-
855-
856-
857QV4::ReturnedValue QQuickJSContext2DPrototype::method_reset(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
858{-
859 QV4::Scope scope(b);-
860 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
861 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
862-
863 r->d()->context->reset();-
864-
865 return
never executed: return QV4::Encode(thisObject->asReturnedValue());
QV4::Encode(thisObject->asReturnedValue());
never executed: return QV4::Encode(thisObject->asReturnedValue());
0
866}-
867QV4::ReturnedValue QQuickJSContext2DPrototype::method_save(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
868{-
869 QV4::Scope scope(b);-
870 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
871 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
872-
873 r->d()->context->pushState();-
874-
875 return
never executed: return QV4::Encode(*thisObject);
QV4::Encode(*thisObject);
never executed: return QV4::Encode(*thisObject);
0
876}-
877QV4::ReturnedValue QQuickJSContext2DPrototype::method_rotate(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
878{-
879 QV4::Scope scope(b);-
880 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
881 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
882-
883 if (argc >= 1
argc >= 1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
884 r->d()->context->rotate(argv[0].toNumber());
never executed: r->d()->context->rotate(argv[0].toNumber());
0
885 return
never executed: return QV4::Encode(*thisObject);
QV4::Encode(*thisObject);
never executed: return QV4::Encode(*thisObject);
0
886}-
887QV4::ReturnedValue QQuickJSContext2DPrototype::method_scale(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
888{-
889 QV4::Scope scope(b);-
890 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
891 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
892-
893-
894 if (argc >= 2
argc >= 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
895 r->d()->context->scale(argv[0].toNumber(), argv[1].toNumber());
never executed: r->d()->context->scale(argv[0].toNumber(), argv[1].toNumber());
0
896 return
never executed: return QV4::Encode(*thisObject);
QV4::Encode(*thisObject);
never executed: return QV4::Encode(*thisObject);
0
897-
898}-
899QV4::ReturnedValue QQuickJSContext2DPrototype::method_setTransform(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
900{-
901 QV4::Scope scope(b);-
902 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
903 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
904-
905-
906 if (argc >= 6
argc >= 6Description
TRUEnever evaluated
FALSEnever evaluated
)
0
907 r->d()->context->setTransform( argv[0].toNumber()
never executed: r->d()->context->setTransform( argv[0].toNumber() , argv[1].toNumber() , argv[2].toNumber() , argv[3].toNumber() , argv[4].toNumber() , argv[5].toNumber());
0
908 , argv[1].toNumber()
never executed: r->d()->context->setTransform( argv[0].toNumber() , argv[1].toNumber() , argv[2].toNumber() , argv[3].toNumber() , argv[4].toNumber() , argv[5].toNumber());
0
909 , argv[2].toNumber()
never executed: r->d()->context->setTransform( argv[0].toNumber() , argv[1].toNumber() , argv[2].toNumber() , argv[3].toNumber() , argv[4].toNumber() , argv[5].toNumber());
0
910 , argv[3].toNumber()
never executed: r->d()->context->setTransform( argv[0].toNumber() , argv[1].toNumber() , argv[2].toNumber() , argv[3].toNumber() , argv[4].toNumber() , argv[5].toNumber());
0
911 , argv[4].toNumber()
never executed: r->d()->context->setTransform( argv[0].toNumber() , argv[1].toNumber() , argv[2].toNumber() , argv[3].toNumber() , argv[4].toNumber() , argv[5].toNumber());
0
912 , argv[5].toNumber());
never executed: r->d()->context->setTransform( argv[0].toNumber() , argv[1].toNumber() , argv[2].toNumber() , argv[3].toNumber() , argv[4].toNumber() , argv[5].toNumber());
0
913-
914 return
never executed: return QV4::Encode(*thisObject);
QV4::Encode(*thisObject);
never executed: return QV4::Encode(*thisObject);
0
915-
916}-
917QV4::ReturnedValue QQuickJSContext2DPrototype::method_transform(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
918{-
919 QV4::Scope scope(b);-
920 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
921 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
922-
923 if (argc >= 6
argc >= 6Description
TRUEnever evaluated
FALSEnever evaluated
)
0
924 r->d()->context->transform( argv[0].toNumber()
never executed: r->d()->context->transform( argv[0].toNumber() , argv[1].toNumber() , argv[2].toNumber() , argv[3].toNumber() , argv[4].toNumber() , argv[5].toNumber());
0
925 , argv[1].toNumber()
never executed: r->d()->context->transform( argv[0].toNumber() , argv[1].toNumber() , argv[2].toNumber() , argv[3].toNumber() , argv[4].toNumber() , argv[5].toNumber());
0
926 , argv[2].toNumber()
never executed: r->d()->context->transform( argv[0].toNumber() , argv[1].toNumber() , argv[2].toNumber() , argv[3].toNumber() , argv[4].toNumber() , argv[5].toNumber());
0
927 , argv[3].toNumber()
never executed: r->d()->context->transform( argv[0].toNumber() , argv[1].toNumber() , argv[2].toNumber() , argv[3].toNumber() , argv[4].toNumber() , argv[5].toNumber());
0
928 , argv[4].toNumber()
never executed: r->d()->context->transform( argv[0].toNumber() , argv[1].toNumber() , argv[2].toNumber() , argv[3].toNumber() , argv[4].toNumber() , argv[5].toNumber());
0
929 , argv[5].toNumber());
never executed: r->d()->context->transform( argv[0].toNumber() , argv[1].toNumber() , argv[2].toNumber() , argv[3].toNumber() , argv[4].toNumber() , argv[5].toNumber());
0
930-
931 return
never executed: return QV4::Encode(*thisObject);
QV4::Encode(*thisObject);
never executed: return QV4::Encode(*thisObject);
0
932-
933}-
934QV4::ReturnedValue QQuickJSContext2DPrototype::method_translate(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
935{-
936 QV4::Scope scope(b);-
937 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
938 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
939-
940 if (argc >= 2
argc >= 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
941 r->d()->context->translate(argv[0].toNumber(), argv[1].toNumber());
never executed: r->d()->context->translate(argv[0].toNumber(), argv[1].toNumber());
0
942 return
never executed: return QV4::Encode(*thisObject);
QV4::Encode(*thisObject);
never executed: return QV4::Encode(*thisObject);
0
943-
944}-
945QV4::ReturnedValue QQuickJSContext2DPrototype::method_resetTransform(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
946{-
947 QV4::Scope scope(b);-
948 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
949 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
950-
951 r->d()->context->setTransform(1, 0, 0, 1, 0, 0);-
952-
953 return
never executed: return QV4::Encode(*thisObject);
QV4::Encode(*thisObject);
never executed: return QV4::Encode(*thisObject);
0
954-
955}-
956QV4::ReturnedValue QQuickJSContext2DPrototype::method_shear(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
957{-
958 QV4::Scope scope(b);-
959 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
960 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
961-
962 if (argc >= 2
argc >= 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
963 r->d()->context->shear(argv[0].toNumber(), argv[1].toNumber());
never executed: r->d()->context->shear(argv[0].toNumber(), argv[1].toNumber());
0
964-
965 return
never executed: return QV4::Encode(*thisObject);
QV4::Encode(*thisObject);
never executed: return QV4::Encode(*thisObject);
0
966-
967}-
968QV4::ReturnedValue QQuickJSContext2D::method_get_globalAlpha(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
969{-
970 QV4::Scope scope(b);-
971 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
972 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
973-
974 return
never executed: return QV4::Encode(QV4::Encode(r->d()->context->state.globalAlpha));
QV4::Encode(QV4::Encode(r->d()->context->state.globalAlpha));
never executed: return QV4::Encode(QV4::Encode(r->d()->context->state.globalAlpha));
0
975}-
976-
977QV4::ReturnedValue QQuickJSContext2D::method_set_globalAlpha(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
978{-
979 QV4::Scope scope(b);-
980 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
981 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
982-
983 double globalAlpha = argc
argcDescription
TRUEnever evaluated
FALSEnever evaluated
? argv[0].toNumber() : qt_qnan();
0
984-
985-
986 if (!qt_is_finite(globalAlpha)
!qt_is_finite(globalAlpha)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
987 return
never executed: return QV4::Encode::undefined();
QV4::Encode::undefined();
never executed: return QV4::Encode::undefined();
0
988-
989 if (globalAlpha >= 0.0
globalAlpha >= 0.0Description
TRUEnever evaluated
FALSEnever evaluated
&& globalAlpha <= 1.0
globalAlpha <= 1.0Description
TRUEnever evaluated
FALSEnever evaluated
&& r->d()->context->state.globalAlpha != globalAlpha
r->d()->contex...!= globalAlphaDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
990 r->d()->context->state.globalAlpha = globalAlpha;-
991 r->d()->context->buffer()->setGlobalAlpha(r->d()->context->state.globalAlpha);-
992 }
never executed: end of block
0
993 return
never executed: return QV4::Encode::undefined();
QV4::Encode::undefined();
never executed: return QV4::Encode::undefined();
0
994}-
995QV4::ReturnedValue QQuickJSContext2D::method_get_globalCompositeOperation(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
996{-
997 QV4::Scope scope(b);-
998 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
999 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
1000-
1001 return
never executed: return QV4::Encode(scope.engine->newString(qt_composite_mode_to_string(r->d()->context->state.globalCompositeOperation)));
QV4::Encode(scope.engine->newString(qt_composite_mode_to_string(r->d()->context->state.globalCompositeOperation)));
never executed: return QV4::Encode(scope.engine->newString(qt_composite_mode_to_string(r->d()->context->state.globalCompositeOperation)));
0
1002}-
1003-
1004QV4::ReturnedValue QQuickJSContext2D::method_set_globalCompositeOperation(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
1005{-
1006 QV4::Scope scope(b);-
1007 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
1008 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
1009-
1010 if (!argc
!argcDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1011 return
never executed: return scope.engine->throwTypeError();
scope.engine->throwTypeError();
never executed: return scope.engine->throwTypeError();
0
1012-
1013 QString mode = argv[0].toQString();-
1014 QPainter::CompositionMode cm = qt_composite_mode_from_string(mode);-
1015 if (cm == QPainter::CompositionMode_SourceOver
cm == QPainter...ode_SourceOverDescription
TRUEnever evaluated
FALSEnever evaluated
&& mode != QLatin1String("source-over")
mode != QLatin..."source-over")Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1016 return
never executed: return QV4::Encode::undefined();
QV4::Encode::undefined();
never executed: return QV4::Encode::undefined();
0
1017-
1018 if (cm != r->d()->context->state.globalCompositeOperation
cm != r->d()->...ositeOperationDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1019 r->d()->context->state.globalCompositeOperation = cm;-
1020 r->d()->context->buffer()->setGlobalCompositeOperation(cm);-
1021 }
never executed: end of block
0
1022-
1023 return
never executed: return QV4::Encode::undefined();
QV4::Encode::undefined();
never executed: return QV4::Encode::undefined();
0
1024}-
1025QV4::ReturnedValue QQuickJSContext2D::method_get_fillStyle(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
1026{-
1027 QV4::Scope scope(b);-
1028 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
1029 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
1030-
1031 QColor color = r->d()->context->state.fillStyle.color();-
1032 if (color.isValid()
color.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1033 if (color.alpha() == 255
color.alpha() == 255Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1034 return
never executed: return QV4::Encode(scope.engine->newString(color.name()));
QV4::Encode(scope.engine->newString(color.name()));
never executed: return QV4::Encode(scope.engine->newString(color.name()));
0
1035 QString alphaString = QString::number(color.alphaF(), 'f');-
1036 while (alphaString.endsWith(QLatin1Char('0'))
alphaString.en...tin1Char('0'))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1037 alphaString.chop(1);
never executed: alphaString.chop(1);
0
1038 if (alphaString.endsWith(QLatin1Char('.'))
alphaString.en...tin1Char('.'))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1039 alphaString += QLatin1Char('0');
never executed: alphaString += QLatin1Char('0');
0
1040 QString str = QString::fromLatin1("rgba(%1, %2, %3, %4)").arg(color.red()).arg(color.green()).arg(color.blue()).arg(alphaString);-
1041 return
never executed: return QV4::Encode(scope.engine->newString(str));
QV4::Encode(scope.engine->newString(str));
never executed: return QV4::Encode(scope.engine->newString(str));
0
1042 }-
1043 return
never executed: return QV4::Encode(r->d()->context->m_fillStyle.value());
QV4::Encode(r->d()->context->m_fillStyle.value());
never executed: return QV4::Encode(r->d()->context->m_fillStyle.value());
0
1044}-
1045-
1046QV4::ReturnedValue QQuickJSContext2D::method_set_fillStyle(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
1047{-
1048 QV4::Scope scope(b);-
1049 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
1050 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
1051-
1052 QV4::ScopedValue value(scope, argc ? argv[0] : QV4::Primitive::undefinedValue());-
1053-
1054 if (value->as<Object>()
value->as<Object>()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1055 QColor color = scope.engine->toVariant(value, qMetaTypeId<QColor>()).value<QColor>();-
1056 if (color.isValid()
color.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1057 r->d()->context->state.fillStyle = color;-
1058 r->d()->context->buffer()->setFillStyle(color);-
1059 r->d()->context->m_fillStyle.set(scope.engine, value);-
1060 }
never executed: end of block
else {
0
1061 QV4::Scoped<QQuickContext2DStyle> style(scope, value->as<QQuickContext2DStyle>());-
1062 if (style
styleDescription
TRUEnever evaluated
FALSEnever evaluated
&& *
*style->d()->b...tate.fillStyleDescription
TRUEnever evaluated
FALSEnever evaluated
style->d()->brush != r->d()->context->state.fillStyle
*style->d()->b...tate.fillStyleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1063 r->d()->context->state.fillStyle = *style->d()->brush;-
1064 r->d()->context->buffer()->setFillStyle(*style->d()->brush, style->d()->patternRepeatX, style->d()->patternRepeatY);-
1065 r->d()->context->m_fillStyle.set(scope.engine, value);-
1066 r->d()->context->state.fillPatternRepeatX = style->d()->patternRepeatX;-
1067 r->d()->context->state.fillPatternRepeatY = style->d()->patternRepeatY;-
1068 }
never executed: end of block
0
1069 }
never executed: end of block
0
1070 } else if (value->isString()
value->isString()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1071 QColor color = qt_color_from_string(value);-
1072 if (color.isValid()
color.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
&& r->d()->context->state.fillStyle != QBrush(color)
r->d()->contex... QBrush(color)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1073 r->d()->context->state.fillStyle = QBrush(color);-
1074 r->d()->context->buffer()->setFillStyle(r->d()->context->state.fillStyle);-
1075 r->d()->context->m_fillStyle.set(scope.engine, value);-
1076 }
never executed: end of block
0
1077 }
never executed: end of block
0
1078 return
never executed: return QV4::Encode::undefined();
QV4::Encode::undefined();
never executed: return QV4::Encode::undefined();
0
1079}-
1080QV4::ReturnedValue QQuickJSContext2D::method_get_fillRule(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *, int)-
1081{-
1082 QV4::Scope scope(b);-
1083 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
1084 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
1085-
1086 return
never executed: return QV4::Encode(scope.engine->fromVariant(r->d()->context->state.fillRule));
QV4::Encode(scope.engine->fromVariant(r->d()->context->state.fillRule));
never executed: return QV4::Encode(scope.engine->fromVariant(r->d()->context->state.fillRule));
0
1087}-
1088-
1089QV4::ReturnedValue QQuickJSContext2D::method_set_fillRule(const QV4::FunctionObject *b, const QV4::Value *thisObject, const QV4::Value *argv, int argc)-
1090{-
1091 QV4::Scope scope(b);-
1092 QV4::Scoped<QQuickJSContext2D> r(scope, thisObject->as<QQuickJSContext2D>());-
1093 if (!r
!rDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context
!r->d()->contextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !r->d()->context->bufferValid()
!r->d()->conte...>bufferValid()Description
TRUEnever evaluated
FALSEnever evaluated
) return
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
never executed: return scope.engine->throwError(QString::fromUtf8("Not a Context2D object"));
0
1094-
1095 QV4::ScopedValue value(scope, argc ? argv[0] : QV4::Primitive::undefinedValue());-
1096-
1097 if ((value->isString()
value->isString()Description
TRUEnever evaluated