Debian Codegraph @

examples/script/context2d/context2d.cpp

raw symbols SCIP
1 /****************************************************************************
2 **
3 ** Copyright (C) 2017 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the examples of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:BSD$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** BSD License Usage
18 ** Alternatively, you may use this file under the terms of the BSD license
19 ** as follows:
20 **
21 ** "Redistribution and use in source and binary forms, with or without
22 ** modification, are permitted provided that the following conditions are
23 ** met:
24 ** * Redistributions of source code must retain the above copyright
25 ** notice, this list of conditions and the following disclaimer.
26 ** * Redistributions in binary form must reproduce the above copyright
27 ** notice, this list of conditions and the following disclaimer in
28 ** the documentation and/or other materials provided with the
29 ** distribution.
30 ** * Neither the name of The Qt Company Ltd nor the names of its
31 ** contributors may be used to endorse or promote products derived
32 ** from this software without specific prior written permission.
33 **
34 **
35 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
36 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
37 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
38 ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
39 ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
40 ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
41 ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
42 ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
43 ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
44 ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
45 ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
46 **
47 ** $QT_END_LICENSE$
48 **
49 ****************************************************************************/
50
51 #include "context2d.h"cxx . . $ `<file>/examples/script/context2d/context2d.h`/
52
53 #include <QVariant>
54 #include <qmath.h>
55
56 #define qClampcxx . . $ `examples/script/context2d/context2d.cpp:56:9`!(val, min, max) qMin(qMax(val, min), max)
57 static QListcxx . . $ QList#<qrealcxx . . $ qreal#> parseNumbersListcxx . . $ parseNumbersList(1d4068bbdf4b8f62).(QStringcxx . . $ QString#::const_iteratorcxx . . $ QString#const_iterator# &itr)
58 {
59 QListcxx . . $ QList#<qrealcxx . . $ qreal#> pointscxx . . $ QList#QList(ced63f7c635d850d).;
60 QStringcxx . . $ QString# tempcxx . . $ QString#QString(ced63f7c635d850d).;
61 while ((*itr).isSpacecxx . . $ QChar#isSpace(3482b152b9333168).())
62 ++itr;
63 while ((*itr).isNumbercxx . . $ QChar#isNumber(3482b152b9333168).() ||
64 (*itr) ==cxx . . $ `operator==`(a468b2f18a3afe8). '-'cxx . . $ QChar#QChar(f349c77f591a7878). || (*itr) ==cxx . . $ `operator==`(a468b2f18a3afe8). '+'cxx . . $ QChar#QChar(f349c77f591a7878). || (*itr) ==cxx . . $ `operator==`(a468b2f18a3afe8). '.'cxx . . $ QChar#QChar(f349c77f591a7878).) {
65 temp =cxx . . $ QString#`operator=`(4f35bf974e7f8568). QStringcxx . . $ QString#QString(ced63f7c635d850d).();
66
67 if ((*itr) ==cxx . . $ `operator==`(a468b2f18a3afe8). '-'cxx . . $ QChar#QChar(f349c77f591a7878).)
68 temp +=cxx . . $ QString#`operator+=`(3a2ffbdf8ecc25e2). *itr++;
69 else if ((*itr) ==cxx . . $ `operator==`(a468b2f18a3afe8). '+'cxx . . $ QChar#QChar(f349c77f591a7878).)
70 temp +=cxx . . $ QString#`operator+=`(3a2ffbdf8ecc25e2). *itr++;
71 while ((*itr).isDigitcxx . . $ QChar#isDigit(3482b152b9333168).())
72 temp +=cxx . . $ QString#`operator+=`(3a2ffbdf8ecc25e2). *itr++;
73 if ((*itr) ==cxx . . $ `operator==`(a468b2f18a3afe8). '.'cxx . . $ QChar#QChar(f349c77f591a7878).)
74 temp +=cxx . . $ QString#`operator+=`(3a2ffbdf8ecc25e2). *itr++;
75 while ((*itr).isDigitcxx . . $ QChar#isDigit(3482b152b9333168).())
76 temp +=cxx . . $ QString#`operator+=`(3a2ffbdf8ecc25e2). *itr++;
77 while ((*itr).isSpacecxx . . $ QChar#isSpace(3482b152b9333168).())
78 ++itr;
79 if ((*itr) ==cxx . . $ `operator==`(a468b2f18a3afe8). ','cxx . . $ QChar#QChar(f349c77f591a7878).)
80 ++itr;
81 points.appendcxx . . $ QList#append(77d9f17553126ecb).(temp.toDoublecxx . . $ QString#toDouble(1bd8e57dd4a29c14).());
82 //eat spaces
83 while ((*itr).isSpacecxx . . $ QChar#isSpace(3482b152b9333168).())
84 ++itr;
85 }
86
87 return pointscxx . . $ QList#QList(88d75cd4b19cb2d1).;
88 }
89
90 QColorcxx . . $ QColor# colorFromStringcxx . . $ colorFromString(9e6ac3906205eeaf).(const QStringcxx . . $ QString# &name)
91 {
92 QStringcxx . . $ QString#::const_iteratorcxx . . $ QString#const_iterator# itr = name.constBegincxx . . $ QString#constBegin(4b5a7d1cd542e2bb).();
93 QListcxx . . $ QList#<qrealcxx . . $ qreal#> compocxx . . $ QList#QList(ced63f7c635d850d).;
94 if (name.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("rgba("cxx . . $ QString#QString(85c52e162fed56f9).)) {
95 ++itr; ++itr; ++itr; ++itr; ++itr;
96 compo =cxx . . $ QList#`operator=`(fb6690361a2f6b44). parseNumbersListcxx . . $ parseNumbersList(1d4068bbdf4b8f62).(itr);
97 if (compo.sizecxx . . $ QList#size(ea6fe5115c70a13f).() != 4) {
98 return QColorcxx . . $ QColor#QColor(ced63f7c635d850d).();
99 }
100 //alpha seems to be always between 0-1
101 compo[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).3] *= 255;
102 return QColorcxx . . $ QColor#QColor(2261ffe5112eab06).((int)compo[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).0], (int)compo[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).1],
103 (int)compo[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).2], (int)compo[cxx . . $ QList#`operator[]`(7a0ef1c7079e8533).3]);
104 } else if (name.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).("rgb("cxx . . $ QString#QString(85c52e162fed56f9).)) {
105 ++itr; ++itr; ++itr; ++itr;
106 compo =cxx . . $ QList#`operator=`(fb6690361a2f6b44). parseNumbersListcxx . . $ parseNumbersList(1d4068bbdf4b8f62).(itr);
107 if (compo.sizecxx . . $ QList#size(ea6fe5115c70a13f).() != 3) {
108 return QColorcxx . . $ QColor#QColor(ced63f7c635d850d).();
109 }
110 return QColorcxx . . $ QColor#QColor(2261ffe5112eab06).((int)qClampcxx . . $ `examples/script/context2d/context2d.cpp:56:9`!(compo[0], qreal(0), qreal(255)),
111 (int)qClampcxx . . $ `examples/script/context2d/context2d.cpp:56:9`!(compo[1], qreal(0), qreal(255)),
112 (int)qClampcxx . . $ `examples/script/context2d/context2d.cpp:56:9`!(compo[2], qreal(0), qreal(255)));
113 } else {
114 //QRgb color;
115 //CSSParser::parseColor(name, color);
116 return QColorcxx . . $ QColor#QColor(3520e46b33348bf6).(name);
117 }
118 }
119
120
121 static QPaintercxx . . $ QPainter#::CompositionModecxx . . $ QPainter#CompositionMode# compositeOperatorFromStringcxx . . $ compositeOperatorFromString(8626e2311996dbea).(const QStringcxx . . $ QString# &compositeOperator)
122 {
123 if ( compositeOperator ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "source-over" ) {
124 return QPaintercxx . . $ QPainter#::CompositionMode_SourceOvercxx . . $ QPainter#CompositionMode_SourceOver.;
125 } else if ( compositeOperator ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "source-out" ) {
126 return QPaintercxx . . $ QPainter#::CompositionMode_SourceOutcxx . . $ QPainter#CompositionMode_SourceOut.;
127 } else if ( compositeOperator ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "source-in" ) {
128 return QPaintercxx . . $ QPainter#::CompositionMode_SourceIncxx . . $ QPainter#CompositionMode_SourceIn.;
129 } else if ( compositeOperator ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "source-atop" ) {
130 return QPaintercxx . . $ QPainter#::CompositionMode_SourceAtopcxx . . $ QPainter#CompositionMode_SourceAtop.;
131 } else if ( compositeOperator ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "destination-atop" ) {
132 return QPaintercxx . . $ QPainter#::CompositionMode_DestinationAtopcxx . . $ QPainter#CompositionMode_DestinationAtop.;
133 } else if ( compositeOperator ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "destination-in" ) {
134 return QPaintercxx . . $ QPainter#::CompositionMode_DestinationIncxx . . $ QPainter#CompositionMode_DestinationIn.;
135 } else if ( compositeOperator ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "destination-out" ) {
136 return QPaintercxx . . $ QPainter#::CompositionMode_DestinationOutcxx . . $ QPainter#CompositionMode_DestinationOut.;
137 } else if ( compositeOperator ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "destination-over" ) {
138 return QPaintercxx . . $ QPainter#::CompositionMode_DestinationOvercxx . . $ QPainter#CompositionMode_DestinationOver.;
139 } else if ( compositeOperator ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "darker" ) {
140 return QPaintercxx . . $ QPainter#::CompositionMode_SourceOvercxx . . $ QPainter#CompositionMode_SourceOver.;
141 } else if ( compositeOperator ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "lighter" ) {
142 return QPaintercxx . . $ QPainter#::CompositionMode_SourceOvercxx . . $ QPainter#CompositionMode_SourceOver.;
143 } else if ( compositeOperator ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "copy" ) {
144 return QPaintercxx . . $ QPainter#::CompositionMode_Sourcecxx . . $ QPainter#CompositionMode_Source.;
145 } else if ( compositeOperator ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "xor" ) {
146 return QPaintercxx . . $ QPainter#::CompositionMode_Xorcxx . . $ QPainter#CompositionMode_Xor.;
147 }
148
149 return QPaintercxx . . $ QPainter#::CompositionMode_SourceOvercxx . . $ QPainter#CompositionMode_SourceOver.;
150 }
151
152 static QStringcxx . . $ QString# compositeOperatorToStringcxx . . $ compositeOperatorToString(bcb0632f9408845e).(QPaintercxx . . $ QPainter#::CompositionModecxx . . $ QPainter#CompositionMode# op)
153 {
154 switch (op) {
155 case QPaintercxx . . $ QPainter#::CompositionMode_SourceOvercxx . . $ QPainter#CompositionMode_SourceOver.:
156 return "source-over"cxx . . $ QString#QString(85c52e162fed56f9).;
157 case QPaintercxx . . $ QPainter#::CompositionMode_DestinationOvercxx . . $ QPainter#CompositionMode_DestinationOver.:
158 return "destination-over"cxx . . $ QString#QString(85c52e162fed56f9).;
159 case QPaintercxx . . $ QPainter#::CompositionMode_Clearcxx . . $ QPainter#CompositionMode_Clear.:
160 return "clear"cxx . . $ QString#QString(85c52e162fed56f9).;
161 case QPaintercxx . . $ QPainter#::CompositionMode_Sourcecxx . . $ QPainter#CompositionMode_Source.:
162 return "source"cxx . . $ QString#QString(85c52e162fed56f9).;
163 case QPaintercxx . . $ QPainter#::CompositionMode_Destinationcxx . . $ QPainter#CompositionMode_Destination.:
164 return "destination"cxx . . $ QString#QString(85c52e162fed56f9).;
165 case QPaintercxx . . $ QPainter#::CompositionMode_SourceIncxx . . $ QPainter#CompositionMode_SourceIn.:
166 return "source-in"cxx . . $ QString#QString(85c52e162fed56f9).;
167 case QPaintercxx . . $ QPainter#::CompositionMode_DestinationIncxx . . $ QPainter#CompositionMode_DestinationIn.:
168 return "destination-in"cxx . . $ QString#QString(85c52e162fed56f9).;
169 case QPaintercxx . . $ QPainter#::CompositionMode_SourceOutcxx . . $ QPainter#CompositionMode_SourceOut.:
170 return "source-out"cxx . . $ QString#QString(85c52e162fed56f9).;
171 case QPaintercxx . . $ QPainter#::CompositionMode_DestinationOutcxx . . $ QPainter#CompositionMode_DestinationOut.:
172 return "destination-out"cxx . . $ QString#QString(85c52e162fed56f9).;
173 case QPaintercxx . . $ QPainter#::CompositionMode_SourceAtopcxx . . $ QPainter#CompositionMode_SourceAtop.:
174 return "source-atop"cxx . . $ QString#QString(85c52e162fed56f9).;
175 case QPaintercxx . . $ QPainter#::CompositionMode_DestinationAtopcxx . . $ QPainter#CompositionMode_DestinationAtop.:
176 return "destination-atop"cxx . . $ QString#QString(85c52e162fed56f9).;
177 case QPaintercxx . . $ QPainter#::CompositionMode_Xorcxx . . $ QPainter#CompositionMode_Xor.:
178 return "xor"cxx . . $ QString#QString(85c52e162fed56f9).;
179 case QPaintercxx . . $ QPainter#::CompositionMode_Pluscxx . . $ QPainter#CompositionMode_Plus.:
180 return "plus"cxx . . $ QString#QString(85c52e162fed56f9).;
181 case QPaintercxx . . $ QPainter#::CompositionMode_Multiplycxx . . $ QPainter#CompositionMode_Multiply.:
182 return "multiply"cxx . . $ QString#QString(85c52e162fed56f9).;
183 case QPaintercxx . . $ QPainter#::CompositionMode_Screencxx . . $ QPainter#CompositionMode_Screen.:
184 return "screen"cxx . . $ QString#QString(85c52e162fed56f9).;
185 case QPaintercxx . . $ QPainter#::CompositionMode_Overlaycxx . . $ QPainter#CompositionMode_Overlay.:
186 return "overlay"cxx . . $ QString#QString(85c52e162fed56f9).;
187 case QPaintercxx . . $ QPainter#::CompositionMode_Darkencxx . . $ QPainter#CompositionMode_Darken.:
188 return "darken"cxx . . $ QString#QString(85c52e162fed56f9).;
189 case QPaintercxx . . $ QPainter#::CompositionMode_Lightencxx . . $ QPainter#CompositionMode_Lighten.:
190 return "lighten"cxx . . $ QString#QString(85c52e162fed56f9).;
191 case QPaintercxx . . $ QPainter#::CompositionMode_ColorDodgecxx . . $ QPainter#CompositionMode_ColorDodge.:
192 return "color-dodge"cxx . . $ QString#QString(85c52e162fed56f9).;
193 case QPaintercxx . . $ QPainter#::CompositionMode_ColorBurncxx . . $ QPainter#CompositionMode_ColorBurn.:
194 return "color-burn"cxx . . $ QString#QString(85c52e162fed56f9).;
195 case QPaintercxx . . $ QPainter#::CompositionMode_HardLightcxx . . $ QPainter#CompositionMode_HardLight.:
196 return "hard-light"cxx . . $ QString#QString(85c52e162fed56f9).;
197 case QPaintercxx . . $ QPainter#::CompositionMode_SoftLightcxx . . $ QPainter#CompositionMode_SoftLight.:
198 return "soft-light"cxx . . $ QString#QString(85c52e162fed56f9).;
199 case QPaintercxx . . $ QPainter#::CompositionMode_Differencecxx . . $ QPainter#CompositionMode_Difference.:
200 return "difference"cxx . . $ QString#QString(85c52e162fed56f9).;
201 case QPaintercxx . . $ QPainter#::CompositionMode_Exclusioncxx . . $ QPainter#CompositionMode_Exclusion.:
202 return "exclusion"cxx . . $ QString#QString(85c52e162fed56f9).;
203 default:
204 break;
205 }
206 return QStringcxx . . $ QString#QString(ced63f7c635d850d).();
207 }
208
209 void Context2Dcxx . . $ Context2D#::savecxx . . $ Context2D#save(49f6e7a06ebc5aa8).()
210 {
211 m_stateStackcxx . . $ Context2D#m_stateStack..pushcxx . . $ QStack#push(77d9f17553126ecb).(m_statecxx . . $ Context2D#m_state.);
212 }
213
214
215 void Context2Dcxx . . $ Context2D#::restorecxx . . $ Context2D#restore(49f6e7a06ebc5aa8).()
216 {
217 if (!m_stateStackcxx . . $ Context2D#m_stateStack..isEmptycxx . . $ QVector#isEmpty(50ce9a9e25b4a850).()) {
218 m_statecxx . . $ Context2D#m_state. =cxx . . $ Context2D#State#`operator=`(490a57cb247ff064). m_stateStackcxx . . $ Context2D#m_stateStack..popcxx . . $ QStack#pop(5f357b03ed472e5e).();
219 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. = AllIsFullOfDirtcxx . . $ Context2D#AllIsFullOfDirt.;
220 }
221 }
222
223
224 void Context2Dcxx . . $ Context2D#::scalecxx . . $ Context2D#scale(bc12c9ec15586e6a).(qrealcxx . . $ qreal# x, qrealcxx . . $ qreal# y)
225 {
226 m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..scalecxx . . $ QTransform#scale(8cff7b8c4086936d).(x, y);
227 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyTransformationMatrixcxx . . $ Context2D#DirtyTransformationMatrix.;
228 }
229
230
231 void Context2Dcxx . . $ Context2D#::rotatecxx . . $ Context2D#rotate(ba8836b59fb42830).(qrealcxx . . $ qreal# angle)
232 {
233 m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..rotatecxx . . $ QTransform#rotate(f4b4d34e4e6c7696).(qRadiansToDegreescxx . . $ qRadiansToDegrees(447c67c6676f75c3).(angle));
234 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyTransformationMatrixcxx . . $ Context2D#DirtyTransformationMatrix.;
235 }
236
237
238 void Context2Dcxx . . $ Context2D#::translatecxx . . $ Context2D#translate(bc12c9ec15586e6a).(qrealcxx . . $ qreal# x, qrealcxx . . $ qreal# y)
239 {
240 m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..translatecxx . . $ QTransform#translate(8cff7b8c4086936d).(x, y);
241 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyTransformationMatrixcxx . . $ Context2D#DirtyTransformationMatrix.;
242 }
243
244
245 void Context2Dcxx . . $ Context2D#::transformcxx . . $ Context2D#transform(56b37c9ef2ead2d3).(qrealcxx . . $ qreal# m11, qrealcxx . . $ qreal# m12, qrealcxx . . $ qreal# m21, qrealcxx . . $ qreal# m22,
246 qrealcxx . . $ qreal# dx, qrealcxx . . $ qreal# dy)
247 {
248 QTransformcxx . . $ QTransform# matcxx . . $ QTransform#QTransform(56b37c9ef2ead2d3).(m11, m12,
249 m21, m22,
250 dx, dy);
251 m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix. *=cxx . . $ QTransform#`operator*=`(47008cfeae02c9bd). mat;
252 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyTransformationMatrixcxx . . $ Context2D#DirtyTransformationMatrix.;
253 }
254
255
256 void Context2Dcxx . . $ Context2D#::setTransformcxx . . $ Context2D#setTransform(56b37c9ef2ead2d3).(qrealcxx . . $ qreal# m11, qrealcxx . . $ qreal# m12, qrealcxx . . $ qreal# m21, qrealcxx . . $ qreal# m22,
257 qrealcxx . . $ qreal# dx, qrealcxx . . $ qreal# dy)
258 {
259 QTransformcxx . . $ QTransform# matcxx . . $ QTransform#QTransform(56b37c9ef2ead2d3).(m11, m12,
260 m21, m22,
261 dx, dy);
262 m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix. =cxx . . $ QTransform#`operator=`(44153ee3b0b133f7). mat;
263 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyTransformationMatrixcxx . . $ Context2D#DirtyTransformationMatrix.;
264 }
265
266
267 QStringcxx . . $ QString# Context2Dcxx . . $ Context2D#::globalCompositeOperationcxx . . $ Context2D#globalCompositeOperation(6ef7b6c27b00b43d).() const
268 {
269 return compositeOperatorToStringcxx . . $ compositeOperatorToString(bcb0632f9408845e).(m_statecxx . . $ Context2D#m_state..globalCompositeOperationcxx . . $ Context2D#State#globalCompositeOperation.);
270 }
271
272 void Context2Dcxx . . $ Context2D#::setGlobalCompositeOperationcxx . . $ Context2D#setGlobalCompositeOperation(3520e46b33348bf6).(const QStringcxx . . $ QString# &op)
273 {
274 QPaintercxx . . $ QPainter#::CompositionModecxx . . $ QPainter#CompositionMode# mode =
275 compositeOperatorFromStringcxx . . $ compositeOperatorFromString(8626e2311996dbea).(op);
276 m_statecxx . . $ Context2D#m_state..globalCompositeOperationcxx . . $ Context2D#State#globalCompositeOperation. = mode;
277 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyGlobalCompositeOperationcxx . . $ Context2D#DirtyGlobalCompositeOperation.;
278 }
279
280 QVariantcxx . . $ QVariant# Context2Dcxx . . $ Context2D#::strokeStylecxx . . $ Context2D#strokeStyle(23280f95d1ccaa1f).() const
281 {
282 return m_statecxx . . $ Context2D#m_state..strokeStylecxx . . $ Context2D#State#strokeStyle.;
283 }
284
285 void Context2Dcxx . . $ Context2D#::setStrokeStylecxx . . $ Context2D#setStrokeStyle(244511558b20107a).(const QVariantcxx . . $ QVariant# &style)
286 {
287 if (style.canConvertcxx . . $ QVariant#canConvert(50ce9a9e25b4a850).<CanvasGradientcxx . . $ CanvasGradient#>()) {
288 CanvasGradientcxx . . $ CanvasGradient# cg = qvariant_castcxx . . $ qvariant_cast(c08a979ef106920f).<CanvasGradientcxx . . $ CanvasGradient#>(style);
289 m_statecxx . . $ Context2D#m_state..strokeStylecxx . . $ Context2D#State#strokeStyle. =cxx . . $ QBrush#`operator=`(124e82ee7962a00b). cgcxx . . $ QBrush#QBrush(cbd511d3bf8d464c)..valuecxx . . $ CanvasGradient#value.;
290 } else {
291 QColorcxx . . $ QColor# color = colorFromStringcxx . . $ colorFromString(9e6ac3906205eeaf).(style.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).());
292 m_statecxx . . $ Context2D#m_state..strokeStylecxx . . $ Context2D#State#strokeStyle. =cxx . . $ QBrush#`operator=`(124e82ee7962a00b). colorcxx . . $ QBrush#QBrush(b50947b0752ea6ac).;
293 }
294 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyStrokeStylecxx . . $ Context2D#DirtyStrokeStyle.;
295 }
296
297 QVariantcxx . . $ QVariant# Context2Dcxx . . $ Context2D#::fillStylecxx . . $ Context2D#fillStyle(23280f95d1ccaa1f).() const
298 {
299 return m_statecxx . . $ Context2D#m_state..fillStylecxx . . $ Context2D#State#fillStyle.;
300 }
301
302 //! [3]
303 void Context2Dcxx . . $ Context2D#::setFillStylecxx . . $ Context2D#setFillStyle(244511558b20107a).(const QVariantcxx . . $ QVariant# &style)
304 {
305 if (style.canConvertcxx . . $ QVariant#canConvert(50ce9a9e25b4a850).<CanvasGradientcxx . . $ CanvasGradient#>()) {
306 CanvasGradientcxx . . $ CanvasGradient# cg = qvariant_castcxx . . $ qvariant_cast(c08a979ef106920f).<CanvasGradientcxx . . $ CanvasGradient#>(style);
307 m_statecxx . . $ Context2D#m_state..fillStylecxx . . $ Context2D#State#fillStyle. =cxx . . $ QBrush#`operator=`(124e82ee7962a00b). cgcxx . . $ QBrush#QBrush(cbd511d3bf8d464c)..valuecxx . . $ CanvasGradient#value.;
308 } else {
309 QColorcxx . . $ QColor# color = colorFromStringcxx . . $ colorFromString(9e6ac3906205eeaf).(style.toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).());
310 m_statecxx . . $ Context2D#m_state..fillStylecxx . . $ Context2D#State#fillStyle. =cxx . . $ QBrush#`operator=`(124e82ee7962a00b). colorcxx . . $ QBrush#QBrush(b50947b0752ea6ac).;
311 }
312 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyFillStylecxx . . $ Context2D#DirtyFillStyle.;
313 }
314 //! [3]
315
316 qrealcxx . . $ qreal# Context2Dcxx . . $ Context2D#::globalAlphacxx . . $ Context2D#globalAlpha(21b6c25e127938e2).() const
317 {
318 return m_statecxx . . $ Context2D#m_state..globalAlphacxx . . $ Context2D#State#globalAlpha.;
319 }
320
321 void Context2Dcxx . . $ Context2D#::setGlobalAlphacxx . . $ Context2D#setGlobalAlpha(ba8836b59fb42830).(qrealcxx . . $ qreal# alpha)
322 {
323 m_statecxx . . $ Context2D#m_state..globalAlphacxx . . $ Context2D#State#globalAlpha. = alpha;
324 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyGlobalAlphacxx . . $ Context2D#DirtyGlobalAlpha.;
325 }
326
327
328 CanvasGradientcxx . . $ CanvasGradient# Context2Dcxx . . $ Context2D#::createLinearGradientcxx . . $ Context2D#createLinearGradient(37260dc536929adc).(qrealcxx . . $ qreal# x0, qrealcxx . . $ qreal# y0,
329 qrealcxx . . $ qreal# x1, qrealcxx . . $ qreal# y1)
330 {
331 QLinearGradientcxx . . $ QLinearGradient# gcxx . . $ QLinearGradient#QLinearGradient(52a61fa14d44b641).(x0, y0, x1, y1);
332 return CanvasGradientcxx . . $ CanvasGradient#(g);
333 }
334
335
336 CanvasGradientcxx . . $ CanvasGradient# Context2Dcxx . . $ Context2D#::createRadialGradientcxx . . $ Context2D#createRadialGradient(5e5ebc2575be79d7).(qrealcxx . . $ qreal# x0, qrealcxx . . $ qreal# y0,
337 qrealcxx . . $ qreal# r0, qrealcxx . . $ qreal# x1,
338 qrealcxx . . $ qreal# y1, qrealcxx . . $ qreal# r1)
339 {
340 QRadialGradientcxx . . $ QRadialGradient# gcxx . . $ QRadialGradient#QRadialGradient(5a76b9ad396af36b).(QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(x1, y1), r0+r1, QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(x0, y0));
341 return CanvasGradientcxx . . $ CanvasGradient#(g);
342 }
343
344 qrealcxx . . $ qreal# Context2Dcxx . . $ Context2D#::lineWidthcxx . . $ Context2D#lineWidth(21b6c25e127938e2).() const
345 {
346 return m_statecxx . . $ Context2D#m_state..lineWidthcxx . . $ Context2D#State#lineWidth.;
347 }
348
349 void Context2Dcxx . . $ Context2D#::setLineWidthcxx . . $ Context2D#setLineWidth(ba8836b59fb42830).(qrealcxx . . $ qreal# w)
350 {
351 m_statecxx . . $ Context2D#m_state..lineWidthcxx . . $ Context2D#State#lineWidth. = w;
352 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyLineWidthcxx . . $ Context2D#DirtyLineWidth.;
353 }
354
355 //! [0]
356 QStringcxx . . $ QString# Context2Dcxx . . $ Context2D#::lineCapcxx . . $ Context2D#lineCap(6ef7b6c27b00b43d).() const
357 {
358 switch (m_statecxx . . $ Context2D#m_state..lineCapcxx . . $ Context2D#State#lineCap.) {
359 case Qtcxx . . $ Qt/::FlatCapcxx . . $ Qt/FlatCap.:
360 return "butt"cxx . . $ QString#QString(85c52e162fed56f9).;
361 case Qtcxx . . $ Qt/::SquareCapcxx . . $ Qt/SquareCap.:
362 return "square"cxx . . $ QString#QString(85c52e162fed56f9).;
363 case Qtcxx . . $ Qt/::RoundCapcxx . . $ Qt/RoundCap.:
364 return "round"cxx . . $ QString#QString(85c52e162fed56f9).;
365 default: ;
366 }
367 return QStringcxx . . $ QString#QString(ced63f7c635d850d).();
368 }
369
370 void Context2Dcxx . . $ Context2D#::setLineCapcxx . . $ Context2D#setLineCap(3520e46b33348bf6).(const QStringcxx . . $ QString# &capString)
371 {
372 Qtcxx . . $ Qt/::PenCapStylecxx . . $ Qt/PenCapStyle# style;
373 if (capString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "round")
374 style = Qtcxx . . $ Qt/::RoundCapcxx . . $ Qt/RoundCap.;
375 else if (capString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "square")
376 style = Qtcxx . . $ Qt/::SquareCapcxx . . $ Qt/SquareCap.;
377 else //if (capString == "butt")
378 style = Qtcxx . . $ Qt/::FlatCapcxx . . $ Qt/FlatCap.;
379 m_statecxx . . $ Context2D#m_state..lineCapcxx . . $ Context2D#State#lineCap. = style;
380 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyLineCapcxx . . $ Context2D#DirtyLineCap.;
381 }
382 //! [0]
383
384 QStringcxx . . $ QString# Context2Dcxx . . $ Context2D#::lineJoincxx . . $ Context2D#lineJoin(6ef7b6c27b00b43d).() const
385 {
386 switch (m_statecxx . . $ Context2D#m_state..lineJoincxx . . $ Context2D#State#lineJoin.) {
387 case Qtcxx . . $ Qt/::RoundJoincxx . . $ Qt/RoundJoin.:
388 return "round"cxx . . $ QString#QString(85c52e162fed56f9).;
389 case Qtcxx . . $ Qt/::BevelJoincxx . . $ Qt/BevelJoin.:
390 return "bevel"cxx . . $ QString#QString(85c52e162fed56f9).;
391 case Qtcxx . . $ Qt/::MiterJoincxx . . $ Qt/MiterJoin.:
392 return "miter"cxx . . $ QString#QString(85c52e162fed56f9).;
393 default: ;
394 }
395 return QStringcxx . . $ QString#QString(ced63f7c635d850d).();
396 }
397
398 void Context2Dcxx . . $ Context2D#::setLineJoincxx . . $ Context2D#setLineJoin(3520e46b33348bf6).(const QStringcxx . . $ QString# &joinString)
399 {
400 Qtcxx . . $ Qt/::PenJoinStylecxx . . $ Qt/PenJoinStyle# style;
401 if (joinString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "round")
402 style = Qtcxx . . $ Qt/::RoundJoincxx . . $ Qt/RoundJoin.;
403 else if (joinString ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "bevel")
404 style = Qtcxx . . $ Qt/::BevelJoincxx . . $ Qt/BevelJoin.;
405 else //if (joinString == "miter")
406 style = Qtcxx . . $ Qt/::MiterJoincxx . . $ Qt/MiterJoin.;
407 m_statecxx . . $ Context2D#m_state..lineJoincxx . . $ Context2D#State#lineJoin. = style;
408 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyLineJoincxx . . $ Context2D#DirtyLineJoin.;
409 }
410
411 qrealcxx . . $ qreal# Context2Dcxx . . $ Context2D#::miterLimitcxx . . $ Context2D#miterLimit(21b6c25e127938e2).() const
412 {
413 return m_statecxx . . $ Context2D#m_state..miterLimitcxx . . $ Context2D#State#miterLimit.;
414 }
415
416 void Context2Dcxx . . $ Context2D#::setMiterLimitcxx . . $ Context2D#setMiterLimit(ba8836b59fb42830).(qrealcxx . . $ qreal# m)
417 {
418 m_statecxx . . $ Context2D#m_state..miterLimitcxx . . $ Context2D#State#miterLimit. = m;
419 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyMiterLimitcxx . . $ Context2D#DirtyMiterLimit.;
420 }
421
422 void Context2Dcxx . . $ Context2D#::setShadowOffsetXcxx . . $ Context2D#setShadowOffsetX(ba8836b59fb42830).(qrealcxx . . $ qreal# x)
423 {
424 m_statecxx . . $ Context2D#m_state..shadowOffsetXcxx . . $ Context2D#State#shadowOffsetX. = x;
425 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyShadowOffsetXcxx . . $ Context2D#DirtyShadowOffsetX.;
426 }
427
428 void Context2Dcxx . . $ Context2D#::setShadowOffsetYcxx . . $ Context2D#setShadowOffsetY(ba8836b59fb42830).(qrealcxx . . $ qreal# y)
429 {
430 m_statecxx . . $ Context2D#m_state..shadowOffsetYcxx . . $ Context2D#State#shadowOffsetY. = y;
431 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyShadowOffsetYcxx . . $ Context2D#DirtyShadowOffsetY.;
432 }
433
434 void Context2Dcxx . . $ Context2D#::setShadowBlurcxx . . $ Context2D#setShadowBlur(ba8836b59fb42830).(qrealcxx . . $ qreal# b)
435 {
436 m_statecxx . . $ Context2D#m_state..shadowBlurcxx . . $ Context2D#State#shadowBlur. = b;
437 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyShadowBlurcxx . . $ Context2D#DirtyShadowBlur.;
438 }
439
440 void Context2Dcxx . . $ Context2D#::setShadowColorcxx . . $ Context2D#setShadowColor(3520e46b33348bf6).(const QStringcxx . . $ QString# &str)
441 {
442 m_statecxx . . $ Context2D#m_state..shadowColorcxx . . $ Context2D#State#shadowColor. =cxx . . $ QColor#`operator=`(fd1b853fb77c9003). colorFromStringcxx . . $ colorFromString(9e6ac3906205eeaf).(str);
443 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyShadowColorcxx . . $ Context2D#DirtyShadowColor.;
444 }
445
446 qrealcxx . . $ qreal# Context2Dcxx . . $ Context2D#::shadowOffsetXcxx . . $ Context2D#shadowOffsetX(21b6c25e127938e2).() const
447 {
448 return m_statecxx . . $ Context2D#m_state..shadowOffsetXcxx . . $ Context2D#State#shadowOffsetX.;
449 }
450
451 qrealcxx . . $ qreal# Context2Dcxx . . $ Context2D#::shadowOffsetYcxx . . $ Context2D#shadowOffsetY(21b6c25e127938e2).() const
452 {
453 return m_statecxx . . $ Context2D#m_state..shadowOffsetYcxx . . $ Context2D#State#shadowOffsetY.;
454 }
455
456
457 qrealcxx . . $ qreal# Context2Dcxx . . $ Context2D#::shadowBlurcxx . . $ Context2D#shadowBlur(21b6c25e127938e2).() const
458 {
459 return m_statecxx . . $ Context2D#m_state..shadowBlurcxx . . $ Context2D#State#shadowBlur.;
460 }
461
462
463 QStringcxx . . $ QString# Context2Dcxx . . $ Context2D#::shadowColorcxx . . $ Context2D#shadowColor(6ef7b6c27b00b43d).() const
464 {
465 return m_statecxx . . $ Context2D#m_state..shadowColorcxx . . $ Context2D#State#shadowColor..namecxx . . $ QColor#name(6ef7b6c27b00b43d).();
466 }
467
468
469 void Context2Dcxx . . $ Context2D#::clearRectcxx . . $ Context2D#clearRect(52a61fa14d44b641).(qrealcxx . . $ qreal# x, qrealcxx . . $ qreal# y, qrealcxx . . $ qreal# w, qrealcxx . . $ qreal# h)
470 {
471 beginPaintingcxx . . $ Context2D#beginPainting(49f6e7a06ebc5aa8).();
472 m_paintercxx . . $ Context2D#m_painter..savecxx . . $ QPainter#save(49f6e7a06ebc5aa8).();
473 m_paintercxx . . $ Context2D#m_painter..setTransformcxx . . $ QPainter#setTransform(6027f8f6db98365c).(QTransformcxx . . $ QTransform#QTransform(a04a5548fc998cd9).(m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix.), false);
474 m_paintercxx . . $ Context2D#m_painter..setCompositionModecxx . . $ QPainter#setCompositionMode(233e5f91a307c5b).(QPaintercxx . . $ QPainter#::CompositionMode_Sourcecxx . . $ QPainter#CompositionMode_Source.);
475 m_paintercxx . . $ Context2D#m_painter..fillRectcxx . . $ QPainter#fillRect(41bf02b42490ec39).(QRectFcxx . . $ QRectF#QRectF(ba0360b8cbb82f7c).(x, y, w, h), QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(0, 0, 0, 0));
476 m_paintercxx . . $ Context2D#m_painter..restorecxx . . $ QPainter#restore(49f6e7a06ebc5aa8).();
477 scheduleChangecxx . . $ Context2D#scheduleChange(49f6e7a06ebc5aa8).();
478 }
479
480
481 //! [1]
482 void Context2Dcxx . . $ Context2D#::fillRectcxx . . $ Context2D#fillRect(52a61fa14d44b641).(qrealcxx . . $ qreal# x, qrealcxx . . $ qreal# y, qrealcxx . . $ qreal# w, qrealcxx . . $ qreal# h)
483 {
484 beginPaintingcxx . . $ Context2D#beginPainting(49f6e7a06ebc5aa8).();
485 m_paintercxx . . $ Context2D#m_painter..savecxx . . $ QPainter#save(49f6e7a06ebc5aa8).();
486 m_paintercxx . . $ Context2D#m_painter..setTransformcxx . . $ QPainter#setTransform(6027f8f6db98365c).(QTransformcxx . . $ QTransform#QTransform(a04a5548fc998cd9).(m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix.), false);
487 m_paintercxx . . $ Context2D#m_painter..fillRectcxx . . $ QPainter#fillRect(44229c86468bbe6f).(QRectFcxx . . $ QRectF#QRectF(ba0360b8cbb82f7c).(x, y, w, h), m_paintercxx . . $ Context2D#m_painter..brushcxx . . $ QPainter#brush(e14a554c07951b96).());
488 m_paintercxx . . $ Context2D#m_painter..restorecxx . . $ QPainter#restore(49f6e7a06ebc5aa8).();
489 scheduleChangecxx . . $ Context2D#scheduleChange(49f6e7a06ebc5aa8).();
490 }
491 //! [1]
492
493
494 void Context2Dcxx . . $ Context2D#::strokeRectcxx . . $ Context2D#strokeRect(52a61fa14d44b641).(qrealcxx . . $ qreal# x, qrealcxx . . $ qreal# y, qrealcxx . . $ qreal# w, qrealcxx . . $ qreal# h)
495 {
496 QPainterPathcxx . . $ QPainterPath# pathcxx . . $ QPainterPath#QPainterPath(ced63f7c635d850d).;
497 path.addRectcxx . . $ QPainterPath#addRect(52a61fa14d44b641).(x, y, w, h);
498 beginPaintingcxx . . $ Context2D#beginPainting(49f6e7a06ebc5aa8).();
499 m_paintercxx . . $ Context2D#m_painter..savecxx . . $ QPainter#save(49f6e7a06ebc5aa8).();
500 m_paintercxx . . $ Context2D#m_painter..setTransformcxx . . $ QPainter#setTransform(6027f8f6db98365c).(QTransformcxx . . $ QTransform#QTransform(a04a5548fc998cd9).(m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix.), false);
501 m_paintercxx . . $ Context2D#m_painter..strokePathcxx . . $ QPainter#strokePath(321b0b3c241e2fb7).(path, m_paintercxx . . $ Context2D#m_painter..pencxx . . $ QPainter#pen(c2cf52b1ccff3464).());
502 m_paintercxx . . $ Context2D#m_painter..restorecxx . . $ QPainter#restore(49f6e7a06ebc5aa8).();
503 scheduleChangecxx . . $ Context2D#scheduleChange(49f6e7a06ebc5aa8).();
504 }
505
506
507 void Context2Dcxx . . $ Context2D#::beginPathcxx . . $ Context2D#beginPath(49f6e7a06ebc5aa8).()
508 {
509 m_pathcxx . . $ Context2D#m_path. =cxx . . $ QPainterPath#`operator=`(6d45b761b6b51a7f). QPainterPathcxx . . $ QPainterPath#QPainterPath(ced63f7c635d850d).();
510 }
511
512
513 void Context2Dcxx . . $ Context2D#::closePathcxx . . $ Context2D#closePath(49f6e7a06ebc5aa8).()
514 {
515 m_pathcxx . . $ Context2D#m_path..closeSubpathcxx . . $ QPainterPath#closeSubpath(49f6e7a06ebc5aa8).();
516 }
517
518
519 void Context2Dcxx . . $ Context2D#::moveTocxx . . $ Context2D#moveTo(bc12c9ec15586e6a).(qrealcxx . . $ qreal# x, qrealcxx . . $ qreal# y)
520 {
521 QPointFcxx . . $ QPointF# pt = m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..mapcxx . . $ QTransform#map(d99487573c8c6d6c).(QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(x, y));
522 m_pathcxx . . $ Context2D#m_path..moveTocxx . . $ QPainterPath#moveTo(4258778b894f8bb6).(pt);
523 }
524
525
526 void Context2Dcxx . . $ Context2D#::lineTocxx . . $ Context2D#lineTo(bc12c9ec15586e6a).(qrealcxx . . $ qreal# x, qrealcxx . . $ qreal# y)
527 {
528 QPointFcxx . . $ QPointF# pt = m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..mapcxx . . $ QTransform#map(d99487573c8c6d6c).(QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(x, y));
529 m_pathcxx . . $ Context2D#m_path..lineTocxx . . $ QPainterPath#lineTo(4258778b894f8bb6).(pt);
530 }
531
532
533 void Context2Dcxx . . $ Context2D#::quadraticCurveTocxx . . $ Context2D#quadraticCurveTo(52a61fa14d44b641).(qrealcxx . . $ qreal# cpx, qrealcxx . . $ qreal# cpy, qrealcxx . . $ qreal# x, qrealcxx . . $ qreal# y)
534 {
535 QPointFcxx . . $ QPointF# cp = m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..mapcxx . . $ QTransform#map(d99487573c8c6d6c).(QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(cpx, cpy));
536 QPointFcxx . . $ QPointF# xy = m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..mapcxx . . $ QTransform#map(d99487573c8c6d6c).(QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(x, y));
537 m_pathcxx . . $ Context2D#m_path..quadTocxx . . $ QPainterPath#quadTo(3628e2b324c1bb0).(cp, xy);
538 }
539
540
541 void Context2Dcxx . . $ Context2D#::bezierCurveTocxx . . $ Context2D#bezierCurveTo(56b37c9ef2ead2d3).(qrealcxx . . $ qreal# cp1x, qrealcxx . . $ qreal# cp1y,
542 qrealcxx . . $ qreal# cp2x, qrealcxx . . $ qreal# cp2y, qrealcxx . . $ qreal# x, qrealcxx . . $ qreal# y)
543 {
544 QPointFcxx . . $ QPointF# cp1 = m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..mapcxx . . $ QTransform#map(d99487573c8c6d6c).(QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(cp1x, cp1y));
545 QPointFcxx . . $ QPointF# cp2 = m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..mapcxx . . $ QTransform#map(d99487573c8c6d6c).(QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(cp2x, cp2y));
546 QPointFcxx . . $ QPointF# end = m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..mapcxx . . $ QTransform#map(d99487573c8c6d6c).(QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(x, y));
547 m_pathcxx . . $ Context2D#m_path..cubicTocxx . . $ QPainterPath#cubicTo(a5ff89a5648c623f).(cp1, cp2, end);
548 }
549
550
551 void Context2Dcxx . . $ Context2D#::arcTocxx . . $ Context2D#arcTo(a8d73491ea06a585).(qrealcxx . . $ qreal# x1, qrealcxx . . $ qreal# y1, qrealcxx . . $ qreal# x2, qrealcxx . . $ qreal# y2, qrealcxx . . $ qreal# radius)
552 {
553 //FIXME: this is surely busted
554 QPointFcxx . . $ QPointF# st = m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..mapcxx . . $ QTransform#map(d99487573c8c6d6c).(QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(x1, y1));
555 QPointFcxx . . $ QPointF# end = m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..mapcxx . . $ QTransform#map(d99487573c8c6d6c).(QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(x2, y2));
556 m_pathcxx . . $ Context2D#m_path..arcTocxx . . $ QPainterPath#arcTo(56b37c9ef2ead2d3).(st.xcxx . . $ QPointF#x(21b6c25e127938e2).(), st.ycxx . . $ QPointF#y(21b6c25e127938e2).(),
557 end.xcxx . . $ QPointF#x(21b6c25e127938e2).()-st.xcxx . . $ QPointF#x(21b6c25e127938e2).(), end.ycxx . . $ QPointF#y(21b6c25e127938e2).()-st.ycxx . . $ QPointF#y(21b6c25e127938e2).(),
558 radius, 90);
559 }
560
561
562 void Context2Dcxx . . $ Context2D#::rectcxx . . $ Context2D#rect(52a61fa14d44b641).(qrealcxx . . $ qreal# x, qrealcxx . . $ qreal# y, qrealcxx . . $ qreal# w, qrealcxx . . $ qreal# h)
563 {
564 QPainterPathcxx . . $ QPainterPath# pathcxx . . $ QPainterPath#QPainterPath(ced63f7c635d850d).; path.addRectcxx . . $ QPainterPath#addRect(52a61fa14d44b641).(x, y, w, h);
565 path =cxx . . $ QPainterPath#`operator=`(6d45b761b6b51a7f). m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..mapcxx . . $ QTransform#map(277ba39567d27352).(path);
566 m_pathcxx . . $ Context2D#m_path..addPathcxx . . $ QPainterPath#addPath(30c23ba204361e3b).(path);
567 }
568
569 void Context2Dcxx . . $ Context2D#::arccxx . . $ Context2D#arc(2880d0c1ef0bc44e).(qrealcxx . . $ qreal# xc, qrealcxx . . $ qreal# yc, qrealcxx . . $ qreal# radius,
570 qrealcxx . . $ qreal# sar, qrealcxx . . $ qreal# ear,
571 bool anticlockwise)
572 {
573 //### HACK
574 // In Qt we don't switch the coordinate system for degrees
575 // and still use the 0,0 as bottom left for degrees so we need
576 // to switch
577 sar = -sar;
578 ear = -ear;
579 anticlockwise = !anticlockwise;
580 //end hack
581
582 float sa = qRadiansToDegreescxx . . $ qRadiansToDegrees(447c67c6676f75c3).(sar);
583 float ea = qRadiansToDegreescxx . . $ qRadiansToDegrees(447c67c6676f75c3).(ear);
584
585 double span = 0;
586
587 double xs = xc - radius;
588 double ys = yc - radius;
589 double width = radius*2;
590 double height = radius*2;
591
592 if (!anticlockwise && (ea < sa)) {
593 span += 360;
594 } else if (anticlockwise && (sa < ea)) {
595 span -= 360;
596 }
597
598 //### this is also due to switched coordinate system
599 // we would end up with a 0 span instead of 360
600 if (!(qFuzzyComparecxx . . $ qFuzzyCompare(828b76dce88fac).(span + (ea - sa) + 1, 1) &&
601 qFuzzyComparecxx . . $ qFuzzyCompare(828b76dce88fac).(qAbscxx . . $ qAbs(6dab451e9a9cc561).(span), 360))) {
602 span += ea - sa;
603 }
604
605 QPainterPathcxx . . $ QPainterPath# pathcxx . . $ QPainterPath#QPainterPath(ced63f7c635d850d).;
606 path.moveTocxx . . $ QPainterPath#moveTo(4258778b894f8bb6).(QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(xc + radius * cos(sar),
607 yc - radius * sin(sar)));
608
609 path.arcTocxx . . $ QPainterPath#arcTo(56b37c9ef2ead2d3).(xs, ys, width, height, sa, span);
610 path =cxx . . $ QPainterPath#`operator=`(6d45b761b6b51a7f). m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..mapcxx . . $ QTransform#map(277ba39567d27352).(path);
611 m_pathcxx . . $ Context2D#m_path..addPathcxx . . $ QPainterPath#addPath(30c23ba204361e3b).(path);
612 }
613
614
615 void Context2Dcxx . . $ Context2D#::fillcxx . . $ Context2D#fill(49f6e7a06ebc5aa8).()
616 {
617 beginPaintingcxx . . $ Context2D#beginPainting(49f6e7a06ebc5aa8).();
618 m_paintercxx . . $ Context2D#m_painter..fillPathcxx . . $ QPainter#fillPath(bf23f3bbfab0c29d).(m_pathcxx . . $ Context2D#m_path., m_paintercxx . . $ Context2D#m_painter..brushcxx . . $ QPainter#brush(e14a554c07951b96).());
619 scheduleChangecxx . . $ Context2D#scheduleChange(49f6e7a06ebc5aa8).();
620 }
621
622
623 void Context2Dcxx . . $ Context2D#::strokecxx . . $ Context2D#stroke(49f6e7a06ebc5aa8).()
624 {
625 beginPaintingcxx . . $ Context2D#beginPainting(49f6e7a06ebc5aa8).();
626 m_paintercxx . . $ Context2D#m_painter..savecxx . . $ QPainter#save(49f6e7a06ebc5aa8).();
627 m_paintercxx . . $ Context2D#m_painter..setTransformcxx . . $ QPainter#setTransform(6027f8f6db98365c).(QTransformcxx . . $ QTransform#QTransform(a04a5548fc998cd9).(m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix.), false);
628 QPainterPathcxx . . $ QPainterPath# tmp = m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix..invertedcxx . . $ QTransform#inverted(90d4d5b277fa8e30).().mapcxx . . $ QTransform#map(277ba39567d27352).(m_pathcxx . . $ Context2D#m_path.);
629 m_paintercxx . . $ Context2D#m_painter..strokePathcxx . . $ QPainter#strokePath(321b0b3c241e2fb7).(tmp, m_paintercxx . . $ Context2D#m_painter..pencxx . . $ QPainter#pen(c2cf52b1ccff3464).());
630 m_paintercxx . . $ Context2D#m_painter..restorecxx . . $ QPainter#restore(49f6e7a06ebc5aa8).();
631 scheduleChangecxx . . $ Context2D#scheduleChange(49f6e7a06ebc5aa8).();
632 }
633
634
635 void Context2Dcxx . . $ Context2D#::clipcxx . . $ Context2D#clip(49f6e7a06ebc5aa8).()
636 {
637 m_statecxx . . $ Context2D#m_state..clipPathcxx . . $ Context2D#State#clipPath. =cxx . . $ QPainterPath#`operator=`(144764f1d005cba9). m_pathcxx . . $ Context2D#m_path.;
638 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. |= DirtyClippingRegioncxx . . $ Context2D#DirtyClippingRegion.;
639 }
640
641
642 bool Context2Dcxx . . $ Context2D#::isPointInPathcxx . . $ Context2D#isPointInPath(332053a3ea1ea5b7).(qrealcxx . . $ qreal# x, qrealcxx . . $ qreal# y) const
643 {
644 return m_pathcxx . . $ Context2D#m_path..containscxx . . $ QPainterPath#contains(b83d2f1159dc0278).(QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(x, y));
645 }
646
647
648 ImageDatacxx . . $ ImageData# Context2Dcxx . . $ Context2D#::getImageDatacxx . . $ Context2D#getImageData(6e5b2e6c8bb8907f).(qrealcxx . . $ qreal# sx, qrealcxx . . $ qreal# sy, qrealcxx . . $ qreal# sw, qrealcxx . . $ qreal# sh)
649 {
650 Q_UNUSEDcxx . . $ `<external>/15045578679651060896/qglobal.h:117:9`!(sx);
651 Q_UNUSEDcxx . . $ `<external>/15045578679651060896/qglobal.h:117:9`!(sy);
652 Q_UNUSEDcxx . . $ `<external>/15045578679651060896/qglobal.h:117:9`!(sw);
653 Q_UNUSEDcxx . . $ `<external>/15045578679651060896/qglobal.h:117:9`!(sh);
654 return ImageDatacxx . . $ ImageData#();
655 }
656
657
658 void Context2Dcxx . . $ Context2D#::putImageDatacxx . . $ Context2D#putImageData(9591d1c072176dcd).(ImageDatacxx . . $ ImageData# image, qrealcxx . . $ qreal# dx, qrealcxx . . $ qreal# dy)
659 {
660 Q_UNUSEDcxx . . $ `<external>/15045578679651060896/qglobal.h:117:9`!(image);
661 Q_UNUSEDcxx . . $ `<external>/15045578679651060896/qglobal.h:117:9`!(dx);
662 Q_UNUSEDcxx . . $ `<external>/15045578679651060896/qglobal.h:117:9`!(dy);
663 }
664
665 Context2Dcxx . . $ Context2D#::Context2Dcxx . . $ Context2D#Context2D(749de1b6ae65bddd).(QObjectcxx . . $ QObject# *parent)
666 : QObjectcxx . . $ QObject#QObject(749de1b6ae65bddd).(parent), m_changeTimerIdcxx . . $ Context2D#m_changeTimerId.(-1)
667 {
668 resetcxx . . $ Context2D#reset(49f6e7a06ebc5aa8).();
669 }
670
671 const QImagecxx . . $ QImage# &Context2Dcxx . . $ Context2D#::endPaintingcxx . . $ Context2D#endPainting(248369caeb2dfca6).()
672 {
673 if (m_paintercxx . . $ Context2D#m_painter..isActivecxx . . $ QPainter#isActive(50ce9a9e25b4a850).())
674 m_paintercxx . . $ Context2D#m_painter..endcxx . . $ QPainter#end(c9857a73d68e59ba).();
675 return m_imagecxx . . $ Context2D#m_image.;
676 }
677
678 void Context2Dcxx . . $ Context2D#::beginPaintingcxx . . $ Context2D#beginPainting(49f6e7a06ebc5aa8).()
679 {
680 if (!m_paintercxx . . $ Context2D#m_painter..isActivecxx . . $ QPainter#isActive(50ce9a9e25b4a850).()) {
681 m_paintercxx . . $ Context2D#m_painter..begincxx . . $ QPainter#begin(3d42010d693361d5).(&m_imagecxx . . $ Context2D#m_image.);
682 m_paintercxx . . $ Context2D#m_painter..setRenderHintcxx . . $ QPainter#setRenderHint(df747a77a7bbbce1).(QPaintercxx . . $ QPainter#::Antialiasingcxx . . $ QPainter#Antialiasing.);
683 if (!m_statecxx . . $ Context2D#m_state..clipPathcxx . . $ Context2D#State#clipPath..isEmptycxx . . $ QPainterPath#isEmpty(50ce9a9e25b4a850).())
684 m_paintercxx . . $ Context2D#m_painter..setClipPathcxx . . $ QPainter#setClipPath(3390533c9b0c0ffb).(m_statecxx . . $ Context2D#m_state..clipPathcxx . . $ Context2D#State#clipPath.);
685 m_paintercxx . . $ Context2D#m_painter..setBrushcxx . . $ QPainter#setBrush(ffc9f5d0bda78261).(m_statecxx . . $ Context2D#m_state..fillStylecxx . . $ Context2D#State#fillStyle.);
686 m_paintercxx . . $ Context2D#m_painter..setOpacitycxx . . $ QPainter#setOpacity(ba8836b59fb42830).(m_statecxx . . $ Context2D#m_state..globalAlphacxx . . $ Context2D#State#globalAlpha.);
687 QPencxx . . $ QPen# pencxx . . $ QPen#QPen(49f6e7a06ebc5aa8).;
688 pen.setBrushcxx . . $ QPen#setBrush(ffc9f5d0bda78261).(m_statecxx . . $ Context2D#m_state..strokeStylecxx . . $ Context2D#State#strokeStyle.);
689 if (pen.stylecxx . . $ QPen#style(94d1e00cc2de155f).() == Qtcxx . . $ Qt/::NoPencxx . . $ Qt/NoPen.)
690 pen.setStylecxx . . $ QPen#setStyle(de7d79e7246fa26d).(Qtcxx . . $ Qt/::SolidLinecxx . . $ Qt/SolidLine.);
691 pen.setCapStylecxx . . $ QPen#setCapStyle(e9d5c76cdef9941c).(m_statecxx . . $ Context2D#m_state..lineCapcxx . . $ Context2D#State#lineCap.);
692 pen.setJoinStylecxx . . $ QPen#setJoinStyle(ca31468bf77b1599).(m_statecxx . . $ Context2D#m_state..lineJoincxx . . $ Context2D#State#lineJoin.);
693 pen.setWidthFcxx . . $ QPen#setWidthF(ba8836b59fb42830).(m_statecxx . . $ Context2D#m_state..lineWidthcxx . . $ Context2D#State#lineWidth.);
694 pen.setMiterLimitcxx . . $ QPen#setMiterLimit(ba8836b59fb42830).(m_statecxx . . $ Context2D#m_state..miterLimitcxx . . $ Context2D#State#miterLimit.);
695 m_paintercxx . . $ Context2D#m_painter..setPencxx . . $ QPainter#setPen(af0a25dfda3214db).(pen);
696 } else {
697 if ((m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. & DirtyClippingRegioncxx . . $ Context2D#DirtyClippingRegion.) && !m_statecxx . . $ Context2D#m_state..clipPathcxx . . $ Context2D#State#clipPath..isEmptycxx . . $ QPainterPath#isEmpty(50ce9a9e25b4a850).())
698 m_paintercxx . . $ Context2D#m_painter..setClipPathcxx . . $ QPainter#setClipPath(3390533c9b0c0ffb).(m_statecxx . . $ Context2D#m_state..clipPathcxx . . $ Context2D#State#clipPath.);
699 if (m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. & DirtyFillStylecxx . . $ Context2D#DirtyFillStyle.)
700 m_paintercxx . . $ Context2D#m_painter..setBrushcxx . . $ QPainter#setBrush(ffc9f5d0bda78261).(m_statecxx . . $ Context2D#m_state..fillStylecxx . . $ Context2D#State#fillStyle.);
701 if (m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. & DirtyGlobalAlphacxx . . $ Context2D#DirtyGlobalAlpha.)
702 m_paintercxx . . $ Context2D#m_painter..setOpacitycxx . . $ QPainter#setOpacity(ba8836b59fb42830).(m_statecxx . . $ Context2D#m_state..globalAlphacxx . . $ Context2D#State#globalAlpha.);
703 if (m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. & DirtyGlobalCompositeOperationcxx . . $ Context2D#DirtyGlobalCompositeOperation.)
704 m_paintercxx . . $ Context2D#m_painter..setCompositionModecxx . . $ QPainter#setCompositionMode(233e5f91a307c5b).(m_statecxx . . $ Context2D#m_state..globalCompositeOperationcxx . . $ Context2D#State#globalCompositeOperation.);
705 if (m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. & MDirtyPencxx . . $ Context2D#MDirtyPen.) {
706 QPencxx . . $ QPen# pen = m_paintercxx . . $ QPen#QPen(1b21ef842481f36f)..pencxx . . $ QPainter#pen(c2cf52b1ccff3464).();
707 if (m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. & DirtyStrokeStylecxx . . $ Context2D#DirtyStrokeStyle.)
708 pen.setBrushcxx . . $ QPen#setBrush(ffc9f5d0bda78261).(m_statecxx . . $ Context2D#m_state..strokeStylecxx . . $ Context2D#State#strokeStyle.);
709 if (m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. & DirtyLineWidthcxx . . $ Context2D#DirtyLineWidth.)
710 pen.setWidthFcxx . . $ QPen#setWidthF(ba8836b59fb42830).(m_statecxx . . $ Context2D#m_state..lineWidthcxx . . $ Context2D#State#lineWidth.);
711 if (m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. & DirtyLineCapcxx . . $ Context2D#DirtyLineCap.)
712 pen.setCapStylecxx . . $ QPen#setCapStyle(e9d5c76cdef9941c).(m_statecxx . . $ Context2D#m_state..lineCapcxx . . $ Context2D#State#lineCap.);
713 if (m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. & DirtyLineJoincxx . . $ Context2D#DirtyLineJoin.)
714 pen.setJoinStylecxx . . $ QPen#setJoinStyle(ca31468bf77b1599).(m_statecxx . . $ Context2D#m_state..lineJoincxx . . $ Context2D#State#lineJoin.);
715 if (m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. & DirtyMiterLimitcxx . . $ Context2D#DirtyMiterLimit.)
716 pen.setMiterLimitcxx . . $ QPen#setMiterLimit(ba8836b59fb42830).(m_statecxx . . $ Context2D#m_state..miterLimitcxx . . $ Context2D#State#miterLimit.);
717 m_paintercxx . . $ Context2D#m_painter..setPencxx . . $ QPainter#setPen(af0a25dfda3214db).(pen);
718 }
719 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. = 0;
720 }
721 }
722
723 void Context2Dcxx . . $ Context2D#::clearcxx . . $ Context2D#clear(49f6e7a06ebc5aa8).()
724 {
725 endPaintingcxx . . $ Context2D#endPainting(248369caeb2dfca6).();
726 m_imagecxx . . $ Context2D#m_image..fillcxx . . $ QImage#fill(cb2f890c2fdad230).(qRgbacxx . . $ qRgba(7a6d2d8711beacc4).(0,0,0,0));
727 scheduleChangecxx . . $ Context2D#scheduleChange(49f6e7a06ebc5aa8).();
728 }
729
730 void Context2Dcxx . . $ Context2D#::resetcxx . . $ Context2D#reset(49f6e7a06ebc5aa8).()
731 {
732 m_stateStackcxx . . $ Context2D#m_stateStack..clearcxx . . $ QVector#clear(49f6e7a06ebc5aa8).();
733 m_statecxx . . $ Context2D#m_state..matrixcxx . . $ Context2D#State#matrix. =cxx . . $ QTransform#`operator=`(7387f4beddc5c2ea). QTransformcxx . . $ QTransform#QTransform(49f6e7a06ebc5aa8).();
734 m_statecxx . . $ Context2D#m_state..clipPathcxx . . $ Context2D#State#clipPath. =cxx . . $ QPainterPath#`operator=`(6d45b761b6b51a7f). QPainterPathcxx . . $ QPainterPath#QPainterPath(ced63f7c635d850d).();
735 m_statecxx . . $ Context2D#m_state..globalAlphacxx . . $ Context2D#State#globalAlpha. = 1.0;
736 m_statecxx . . $ Context2D#m_state..globalCompositeOperationcxx . . $ Context2D#State#globalCompositeOperation. = QPaintercxx . . $ QPainter#::CompositionMode_SourceOvercxx . . $ QPainter#CompositionMode_SourceOver.;
737 m_statecxx . . $ Context2D#m_state..strokeStylecxx . . $ Context2D#State#strokeStyle. =cxx . . $ QBrush#`operator=`(124e82ee7962a00b). Qtcxx . . $ QBrush#QBrush(1975e3c608654284).::blackcxx . . $ Qt/black.;
738 m_statecxx . . $ Context2D#m_state..fillStylecxx . . $ Context2D#State#fillStyle. =cxx . . $ QBrush#`operator=`(124e82ee7962a00b). Qtcxx . . $ QBrush#QBrush(1975e3c608654284).::blackcxx . . $ Qt/black.;
739 m_statecxx . . $ Context2D#m_state..lineWidthcxx . . $ Context2D#State#lineWidth. = 1;
740 m_statecxx . . $ Context2D#m_state..lineCapcxx . . $ Context2D#State#lineCap. = Qtcxx . . $ Qt/::FlatCapcxx . . $ Qt/FlatCap.;
741 m_statecxx . . $ Context2D#m_state..lineJoincxx . . $ Context2D#State#lineJoin. = Qtcxx . . $ Qt/::MiterJoincxx . . $ Qt/MiterJoin.;
742 m_statecxx . . $ Context2D#m_state..miterLimitcxx . . $ Context2D#State#miterLimit. = 10;
743 m_statecxx . . $ Context2D#m_state..shadowOffsetXcxx . . $ Context2D#State#shadowOffsetX. = 0;
744 m_statecxx . . $ Context2D#m_state..shadowOffsetYcxx . . $ Context2D#State#shadowOffsetY. = 0;
745 m_statecxx . . $ Context2D#m_state..shadowBlurcxx . . $ Context2D#State#shadowBlur. = 0;
746 m_statecxx . . $ Context2D#m_state..shadowColorcxx . . $ Context2D#State#shadowColor. =cxx . . $ QColor#`operator=`(fd1b853fb77c9003). qRgbacxx . . $ QColor#QColor(6bab9b75950d6f3).(0, 0, 0, 0);
747 m_statecxx . . $ Context2D#m_state..flagscxx . . $ Context2D#State#flags. = AllIsFullOfDirtcxx . . $ Context2D#AllIsFullOfDirt.;
748 clearcxx . . $ Context2D#clear(49f6e7a06ebc5aa8).();
749 }
750
751 void Context2Dcxx . . $ Context2D#::setSizecxx . . $ Context2D#setSize(3e454b8ccf442868).(int width, int height)
752 {
753 endPaintingcxx . . $ Context2D#endPainting(248369caeb2dfca6).();
754 QImagecxx . . $ QImage# newicxx . . $ QImage#QImage(bf9e47a5364bf007).(width, height, QImagecxx . . $ QImage#::Format_ARGB32_Premultipliedcxx . . $ QImage#Format_ARGB32_Premultiplied.);
755 newi.fillcxx . . $ QImage#fill(cb2f890c2fdad230).(qRgbacxx . . $ qRgba(7a6d2d8711beacc4).(0,0,0,0));
756 QPaintercxx . . $ QPainter# pcxx . . $ QPainter#QPainter(dd2eedc069b0ab5f).(&newi);
757 p.drawImagecxx . . $ QPainter#drawImage(24e2182690a926fc).(0, 0, m_imagecxx . . $ Context2D#m_image.);
758 p.endcxx . . $ QPainter#end(c9857a73d68e59ba).();
759 m_imagecxx . . $ Context2D#m_image. =cxx . . $ QImage#`operator=`(acb38987752f17f1). newi;
760 scheduleChangecxx . . $ Context2D#scheduleChange(49f6e7a06ebc5aa8).();
761 }
762
763 void Context2Dcxx . . $ Context2D#::setSizecxx . . $ Context2D#setSize(1c5f201b4c2f0aba).(const QSizecxx . . $ QSize# &size)
764 {
765 setSizecxx . . $ Context2D#setSize(3e454b8ccf442868).(size.widthcxx . . $ QSize#width(ea6fe5115c70a13f).(), size.heightcxx . . $ QSize#height(ea6fe5115c70a13f).());
766 }
767
768 QSizecxx . . $ QSize# Context2Dcxx . . $ Context2D#::sizecxx . . $ Context2D#size(4b3b776e5ee2b367).() const
769 {
770 return m_imagecxx . . $ Context2D#m_image..sizecxx . . $ QImage#size(4b3b776e5ee2b367).();
771 }
772
773 void Context2Dcxx . . $ Context2D#::drawImagecxx . . $ Context2D#drawImage(f4a77c5cb2acef54).(DomImagecxx . . $ DomImage# *image, qrealcxx . . $ qreal# dx, qrealcxx . . $ qreal# dy)
774 {
775 if (!image)
776 return;
777 if (dx < 0) {
778 qrealcxx . . $ qreal# sx = qAbscxx . . $ qAbs(6dab451e9a9cc561).(dx);
779 qrealcxx . . $ qreal# sy = qAbscxx . . $ qAbs(6dab451e9a9cc561).(dy);
780 qrealcxx . . $ qreal# sw = image->widthcxx . . $ DomImage#width(455f465bc33b4cdf).() - sx;
781 qrealcxx . . $ qreal# sh = image->heightcxx . . $ DomImage#height(455f465bc33b4cdf).() - sy;
782
783 drawImagecxx . . $ Context2D#drawImage(b7b2c78a8da508d0).(image, sx, sy, sw, sh, 0, 0, sw, sh);
784 } else {
785 beginPaintingcxx . . $ Context2D#beginPainting(49f6e7a06ebc5aa8).();
786 m_paintercxx . . $ Context2D#m_painter..drawImagecxx . . $ QPainter#drawImage(64aec71db5bcfe3b).(QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(dx, dy), image->imagecxx . . $ DomImage#image(9d1af4a29bd91ec6).());
787 scheduleChangecxx . . $ Context2D#scheduleChange(49f6e7a06ebc5aa8).();
788 }
789 }
790
791 void Context2Dcxx . . $ Context2D#::drawImagecxx . . $ Context2D#drawImage(2e478436e046a0d9).(DomImagecxx . . $ DomImage# *image, qrealcxx . . $ qreal# dx, qrealcxx . . $ qreal# dy,
792 qrealcxx . . $ qreal# dw, qrealcxx . . $ qreal# dh)
793 {
794 if (!image)
795 return;
796 beginPaintingcxx . . $ Context2D#beginPainting(49f6e7a06ebc5aa8).();
797 m_paintercxx . . $ Context2D#m_painter..drawImagecxx . . $ QPainter#drawImage(2eae8db60707222a).(QRectFcxx . . $ QRectF#QRectF(ba0360b8cbb82f7c).(dx, dy, dw, dh).toRectcxx . . $ QRectF#toRect(e6cdfbae3abc21e7).(), image->imagecxx . . $ DomImage#image(9d1af4a29bd91ec6).());
798 scheduleChangecxx . . $ Context2D#scheduleChange(49f6e7a06ebc5aa8).();
799 }
800
801 void Context2Dcxx . . $ Context2D#::drawImagecxx . . $ Context2D#drawImage(b7b2c78a8da508d0).(DomImagecxx . . $ DomImage# *image, qrealcxx . . $ qreal# sx, qrealcxx . . $ qreal# sy,
802 qrealcxx . . $ qreal# sw, qrealcxx . . $ qreal# sh, qrealcxx . . $ qreal# dx, qrealcxx . . $ qreal# dy,
803 qrealcxx . . $ qreal# dw, qrealcxx . . $ qreal# dh)
804 {
805 if (!image)
806 return;
807 beginPaintingcxx . . $ Context2D#beginPainting(49f6e7a06ebc5aa8).();
808 m_paintercxx . . $ Context2D#m_painter..drawImagecxx . . $ QPainter#drawImage(a5312e2f35e61e56).(QRectFcxx . . $ QRectF#QRectF(ba0360b8cbb82f7c).(dx, dy, dw, dh), image->imagecxx . . $ DomImage#image(9d1af4a29bd91ec6).(),
809 QRectFcxx . . $ QRectF#QRectF(ba0360b8cbb82f7c).(sx, sy, sw, sh));
810 scheduleChangecxx . . $ Context2D#scheduleChange(49f6e7a06ebc5aa8).();
811 }
812
813 //! [2]
814 void Context2Dcxx . . $ Context2D#::scheduleChangecxx . . $ Context2D#scheduleChange(49f6e7a06ebc5aa8).()
815 {
816 if (m_changeTimerIdcxx . . $ Context2D#m_changeTimerId. == -1)
817 m_changeTimerIdcxx . . $ Context2D#m_changeTimerId. = startTimercxx . . $ QObject#startTimer(cf5d4a693bb15cf1).(0);
818 }
819
820 void Context2Dcxx . . $ Context2D#::timerEventcxx . . $ Context2D#timerEvent(b9e57d1150f23bf5).(QTimerEventcxx . . $ QTimerEvent# *e)
821 {
822 if (e->timerIdcxx . . $ QTimerEvent#timerId(455f465bc33b4cdf).() == m_changeTimerIdcxx . . $ Context2D#m_changeTimerId.) {
823 killTimercxx . . $ QObject#killTimer(d4f767463ce0a6b3).(m_changeTimerIdcxx . . $ Context2D#m_changeTimerId.);
824 m_changeTimerIdcxx . . $ Context2D#m_changeTimerId. = -1;
825 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! changedcxx . . $ Context2D#changed(9ff1334af0ec69dd).(endPaintingcxx . . $ Context2D#endPainting(248369caeb2dfca6).());
826 } else {
827 QObjectcxx . . $ QObject#::timerEventcxx . . $ QObject#timerEvent(b9e57d1150f23bf5).(e);
828 }
829 }
830 //! [2]