OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
2 // for details. All rights reserved. Use of this source code is governed by a | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 // WARNING: Do not edit - generated code. | |
6 | |
7 class _CanvasRenderingContext2DWrappingImplementation extends _CanvasRenderingCo
ntextWrappingImplementation implements CanvasRenderingContext2D { | |
8 _CanvasRenderingContext2DWrappingImplementation() : super() {} | |
9 | |
10 static create__CanvasRenderingContext2DWrappingImplementation() native { | |
11 return new _CanvasRenderingContext2DWrappingImplementation(); | |
12 } | |
13 | |
14 Dynamic get fillStyle() { return _get_fillStyle(this); } | |
15 static Dynamic _get_fillStyle(var _this) native; | |
16 | |
17 void set fillStyle(Dynamic value) { _set_fillStyle(this, value); } | |
18 static void _set_fillStyle(var _this, Dynamic value) native; | |
19 | |
20 String get font() { return _get_font(this); } | |
21 static String _get_font(var _this) native; | |
22 | |
23 void set font(String value) { _set_font(this, value); } | |
24 static void _set_font(var _this, String value) native; | |
25 | |
26 num get globalAlpha() { return _get_globalAlpha(this); } | |
27 static num _get_globalAlpha(var _this) native; | |
28 | |
29 void set globalAlpha(num value) { _set_globalAlpha(this, value); } | |
30 static void _set_globalAlpha(var _this, num value) native; | |
31 | |
32 String get globalCompositeOperation() { return _get_globalCompositeOperation(t
his); } | |
33 static String _get_globalCompositeOperation(var _this) native; | |
34 | |
35 void set globalCompositeOperation(String value) { _set_globalCompositeOperatio
n(this, value); } | |
36 static void _set_globalCompositeOperation(var _this, String value) native; | |
37 | |
38 String get lineCap() { return _get_lineCap(this); } | |
39 static String _get_lineCap(var _this) native; | |
40 | |
41 void set lineCap(String value) { _set_lineCap(this, value); } | |
42 static void _set_lineCap(var _this, String value) native; | |
43 | |
44 String get lineJoin() { return _get_lineJoin(this); } | |
45 static String _get_lineJoin(var _this) native; | |
46 | |
47 void set lineJoin(String value) { _set_lineJoin(this, value); } | |
48 static void _set_lineJoin(var _this, String value) native; | |
49 | |
50 num get lineWidth() { return _get_lineWidth(this); } | |
51 static num _get_lineWidth(var _this) native; | |
52 | |
53 void set lineWidth(num value) { _set_lineWidth(this, value); } | |
54 static void _set_lineWidth(var _this, num value) native; | |
55 | |
56 num get miterLimit() { return _get_miterLimit(this); } | |
57 static num _get_miterLimit(var _this) native; | |
58 | |
59 void set miterLimit(num value) { _set_miterLimit(this, value); } | |
60 static void _set_miterLimit(var _this, num value) native; | |
61 | |
62 num get shadowBlur() { return _get_shadowBlur(this); } | |
63 static num _get_shadowBlur(var _this) native; | |
64 | |
65 void set shadowBlur(num value) { _set_shadowBlur(this, value); } | |
66 static void _set_shadowBlur(var _this, num value) native; | |
67 | |
68 String get shadowColor() { return _get_shadowColor(this); } | |
69 static String _get_shadowColor(var _this) native; | |
70 | |
71 void set shadowColor(String value) { _set_shadowColor(this, value); } | |
72 static void _set_shadowColor(var _this, String value) native; | |
73 | |
74 num get shadowOffsetX() { return _get_shadowOffsetX(this); } | |
75 static num _get_shadowOffsetX(var _this) native; | |
76 | |
77 void set shadowOffsetX(num value) { _set_shadowOffsetX(this, value); } | |
78 static void _set_shadowOffsetX(var _this, num value) native; | |
79 | |
80 num get shadowOffsetY() { return _get_shadowOffsetY(this); } | |
81 static num _get_shadowOffsetY(var _this) native; | |
82 | |
83 void set shadowOffsetY(num value) { _set_shadowOffsetY(this, value); } | |
84 static void _set_shadowOffsetY(var _this, num value) native; | |
85 | |
86 Dynamic get strokeStyle() { return _get_strokeStyle(this); } | |
87 static Dynamic _get_strokeStyle(var _this) native; | |
88 | |
89 void set strokeStyle(Dynamic value) { _set_strokeStyle(this, value); } | |
90 static void _set_strokeStyle(var _this, Dynamic value) native; | |
91 | |
92 String get textAlign() { return _get_textAlign(this); } | |
93 static String _get_textAlign(var _this) native; | |
94 | |
95 void set textAlign(String value) { _set_textAlign(this, value); } | |
96 static void _set_textAlign(var _this, String value) native; | |
97 | |
98 String get textBaseline() { return _get_textBaseline(this); } | |
99 static String _get_textBaseline(var _this) native; | |
100 | |
101 void set textBaseline(String value) { _set_textBaseline(this, value); } | |
102 static void _set_textBaseline(var _this, String value) native; | |
103 | |
104 List get webkitLineDash() { return _get_webkitLineDash(this); } | |
105 static List _get_webkitLineDash(var _this) native; | |
106 | |
107 void set webkitLineDash(List value) { _set_webkitLineDash(this, value); } | |
108 static void _set_webkitLineDash(var _this, List value) native; | |
109 | |
110 num get webkitLineDashOffset() { return _get_webkitLineDashOffset(this); } | |
111 static num _get_webkitLineDashOffset(var _this) native; | |
112 | |
113 void set webkitLineDashOffset(num value) { _set_webkitLineDashOffset(this, val
ue); } | |
114 static void _set_webkitLineDashOffset(var _this, num value) native; | |
115 | |
116 void arc(num x, num y, num radius, num startAngle, num endAngle, bool anticloc
kwise) { | |
117 _arc(this, x, y, radius, startAngle, endAngle, anticlockwise); | |
118 return; | |
119 } | |
120 static void _arc(receiver, x, y, radius, startAngle, endAngle, anticlockwise)
native; | |
121 | |
122 void arcTo(num x1, num y1, num x2, num y2, num radius) { | |
123 _arcTo(this, x1, y1, x2, y2, radius); | |
124 return; | |
125 } | |
126 static void _arcTo(receiver, x1, y1, x2, y2, radius) native; | |
127 | |
128 void beginPath() { | |
129 _beginPath(this); | |
130 return; | |
131 } | |
132 static void _beginPath(receiver) native; | |
133 | |
134 void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) { | |
135 _bezierCurveTo(this, cp1x, cp1y, cp2x, cp2y, x, y); | |
136 return; | |
137 } | |
138 static void _bezierCurveTo(receiver, cp1x, cp1y, cp2x, cp2y, x, y) native; | |
139 | |
140 void clearRect(num x, num y, num width, num height) { | |
141 _clearRect(this, x, y, width, height); | |
142 return; | |
143 } | |
144 static void _clearRect(receiver, x, y, width, height) native; | |
145 | |
146 void clearShadow() { | |
147 _clearShadow(this); | |
148 return; | |
149 } | |
150 static void _clearShadow(receiver) native; | |
151 | |
152 void clip() { | |
153 _clip(this); | |
154 return; | |
155 } | |
156 static void _clip(receiver) native; | |
157 | |
158 void closePath() { | |
159 _closePath(this); | |
160 return; | |
161 } | |
162 static void _closePath(receiver) native; | |
163 | |
164 ImageData createImageData(var imagedata_OR_sw, [num sh = null]) { | |
165 if (imagedata_OR_sw is ImageData) { | |
166 if (sh === null) { | |
167 return _createImageData(this, imagedata_OR_sw); | |
168 } | |
169 } else { | |
170 if (imagedata_OR_sw is num) { | |
171 return _createImageData_2(this, imagedata_OR_sw, sh); | |
172 } | |
173 } | |
174 throw "Incorrect number or type of arguments"; | |
175 } | |
176 static ImageData _createImageData(receiver, imagedata_OR_sw) native; | |
177 static ImageData _createImageData_2(receiver, imagedata_OR_sw, sh) native; | |
178 | |
179 CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) { | |
180 return _createLinearGradient(this, x0, y0, x1, y1); | |
181 } | |
182 static CanvasGradient _createLinearGradient(receiver, x0, y0, x1, y1) native; | |
183 | |
184 CanvasPattern createPattern(var canvas_OR_image, String repetitionType) { | |
185 if (canvas_OR_image is HTMLCanvasElement) { | |
186 return _createPattern(this, canvas_OR_image, repetitionType); | |
187 } else { | |
188 if (canvas_OR_image is HTMLImageElement) { | |
189 return _createPattern_2(this, canvas_OR_image, repetitionType); | |
190 } | |
191 } | |
192 throw "Incorrect number or type of arguments"; | |
193 } | |
194 static CanvasPattern _createPattern(receiver, canvas_OR_image, repetitionType)
native; | |
195 static CanvasPattern _createPattern_2(receiver, canvas_OR_image, repetitionTyp
e) native; | |
196 | |
197 CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, nu
m r1) { | |
198 return _createRadialGradient(this, x0, y0, r0, x1, y1, r1); | |
199 } | |
200 static CanvasGradient _createRadialGradient(receiver, x0, y0, r0, x1, y1, r1)
native; | |
201 | |
202 void drawImage(var canvas_OR_image_OR_video, num sx_OR_x, num sy_OR_y, [num sw
_OR_width = null, num height_OR_sh = null, num dx = null, num dy = null, num dw
= null, num dh = null]) { | |
203 if (canvas_OR_image_OR_video is HTMLImageElement) { | |
204 if (sw_OR_width === null) { | |
205 if (height_OR_sh === null) { | |
206 if (dx === null) { | |
207 if (dy === null) { | |
208 if (dw === null) { | |
209 if (dh === null) { | |
210 _drawImage(this, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y); | |
211 return; | |
212 } | |
213 } | |
214 } | |
215 } | |
216 } | |
217 } else { | |
218 if (dx === null) { | |
219 if (dy === null) { | |
220 if (dw === null) { | |
221 if (dh === null) { | |
222 _drawImage_2(this, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, s
w_OR_width, height_OR_sh); | |
223 return; | |
224 } | |
225 } | |
226 } | |
227 } else { | |
228 _drawImage_3(this, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_w
idth, height_OR_sh, dx, dy, dw, dh); | |
229 return; | |
230 } | |
231 } | |
232 } else { | |
233 if (canvas_OR_image_OR_video is HTMLCanvasElement) { | |
234 if (sw_OR_width === null) { | |
235 if (height_OR_sh === null) { | |
236 if (dx === null) { | |
237 if (dy === null) { | |
238 if (dw === null) { | |
239 if (dh === null) { | |
240 _drawImage_4(this, canvas_OR_image_OR_video, sx_OR_x, sy_OR_
y); | |
241 return; | |
242 } | |
243 } | |
244 } | |
245 } | |
246 } | |
247 } else { | |
248 if (dx === null) { | |
249 if (dy === null) { | |
250 if (dw === null) { | |
251 if (dh === null) { | |
252 _drawImage_5(this, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y,
sw_OR_width, height_OR_sh); | |
253 return; | |
254 } | |
255 } | |
256 } | |
257 } else { | |
258 _drawImage_6(this, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR
_width, height_OR_sh, dx, dy, dw, dh); | |
259 return; | |
260 } | |
261 } | |
262 } else { | |
263 if (canvas_OR_image_OR_video is HTMLVideoElement) { | |
264 if (sw_OR_width === null) { | |
265 if (height_OR_sh === null) { | |
266 if (dx === null) { | |
267 if (dy === null) { | |
268 if (dw === null) { | |
269 if (dh === null) { | |
270 _drawImage_7(this, canvas_OR_image_OR_video, sx_OR_x, sy_O
R_y); | |
271 return; | |
272 } | |
273 } | |
274 } | |
275 } | |
276 } | |
277 } else { | |
278 if (dx === null) { | |
279 if (dy === null) { | |
280 if (dw === null) { | |
281 if (dh === null) { | |
282 _drawImage_8(this, canvas_OR_image_OR_video, sx_OR_x, sy_OR_
y, sw_OR_width, height_OR_sh); | |
283 return; | |
284 } | |
285 } | |
286 } | |
287 } else { | |
288 _drawImage_9(this, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_
OR_width, height_OR_sh, dx, dy, dw, dh); | |
289 return; | |
290 } | |
291 } | |
292 } | |
293 } | |
294 } | |
295 throw "Incorrect number or type of arguments"; | |
296 } | |
297 static void _drawImage(receiver, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y) n
ative; | |
298 static void _drawImage_2(receiver, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y,
sw_OR_width, height_OR_sh) native; | |
299 static void _drawImage_3(receiver, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y,
sw_OR_width, height_OR_sh, dx, dy, dw, dh) native; | |
300 static void _drawImage_4(receiver, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y)
native; | |
301 static void _drawImage_5(receiver, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y,
sw_OR_width, height_OR_sh) native; | |
302 static void _drawImage_6(receiver, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y,
sw_OR_width, height_OR_sh, dx, dy, dw, dh) native; | |
303 static void _drawImage_7(receiver, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y)
native; | |
304 static void _drawImage_8(receiver, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y,
sw_OR_width, height_OR_sh) native; | |
305 static void _drawImage_9(receiver, canvas_OR_image_OR_video, sx_OR_x, sy_OR_y,
sw_OR_width, height_OR_sh, dx, dy, dw, dh) native; | |
306 | |
307 void drawImageFromRect(HTMLImageElement image, [num sx = null, num sy = null,
num sw = null, num sh = null, num dx = null, num dy = null, num dw = null, num d
h = null, String compositeOperation = null]) { | |
308 if (sx === null) { | |
309 if (sy === null) { | |
310 if (sw === null) { | |
311 if (sh === null) { | |
312 if (dx === null) { | |
313 if (dy === null) { | |
314 if (dw === null) { | |
315 if (dh === null) { | |
316 if (compositeOperation === null) { | |
317 _drawImageFromRect(this, image); | |
318 return; | |
319 } | |
320 } | |
321 } | |
322 } | |
323 } | |
324 } | |
325 } | |
326 } | |
327 } else { | |
328 if (sy === null) { | |
329 if (sw === null) { | |
330 if (sh === null) { | |
331 if (dx === null) { | |
332 if (dy === null) { | |
333 if (dw === null) { | |
334 if (dh === null) { | |
335 if (compositeOperation === null) { | |
336 _drawImageFromRect_2(this, image, sx); | |
337 return; | |
338 } | |
339 } | |
340 } | |
341 } | |
342 } | |
343 } | |
344 } | |
345 } else { | |
346 if (sw === null) { | |
347 if (sh === null) { | |
348 if (dx === null) { | |
349 if (dy === null) { | |
350 if (dw === null) { | |
351 if (dh === null) { | |
352 if (compositeOperation === null) { | |
353 _drawImageFromRect_3(this, image, sx, sy); | |
354 return; | |
355 } | |
356 } | |
357 } | |
358 } | |
359 } | |
360 } | |
361 } else { | |
362 if (sh === null) { | |
363 if (dx === null) { | |
364 if (dy === null) { | |
365 if (dw === null) { | |
366 if (dh === null) { | |
367 if (compositeOperation === null) { | |
368 _drawImageFromRect_4(this, image, sx, sy, sw); | |
369 return; | |
370 } | |
371 } | |
372 } | |
373 } | |
374 } | |
375 } else { | |
376 if (dx === null) { | |
377 if (dy === null) { | |
378 if (dw === null) { | |
379 if (dh === null) { | |
380 if (compositeOperation === null) { | |
381 _drawImageFromRect_5(this, image, sx, sy, sw, sh); | |
382 return; | |
383 } | |
384 } | |
385 } | |
386 } | |
387 } else { | |
388 if (dy === null) { | |
389 if (dw === null) { | |
390 if (dh === null) { | |
391 if (compositeOperation === null) { | |
392 _drawImageFromRect_6(this, image, sx, sy, sw, sh, dx); | |
393 return; | |
394 } | |
395 } | |
396 } | |
397 } else { | |
398 if (dw === null) { | |
399 if (dh === null) { | |
400 if (compositeOperation === null) { | |
401 _drawImageFromRect_7(this, image, sx, sy, sw, sh, dx, dy); | |
402 return; | |
403 } | |
404 } | |
405 } else { | |
406 if (dh === null) { | |
407 if (compositeOperation === null) { | |
408 _drawImageFromRect_8(this, image, sx, sy, sw, sh, dx, dy,
dw); | |
409 return; | |
410 } | |
411 } else { | |
412 if (compositeOperation === null) { | |
413 _drawImageFromRect_9(this, image, sx, sy, sw, sh, dx, dy,
dw, dh); | |
414 return; | |
415 } else { | |
416 _drawImageFromRect_10(this, image, sx, sy, sw, sh, dx, dy,
dw, dh, compositeOperation); | |
417 return; | |
418 } | |
419 } | |
420 } | |
421 } | |
422 } | |
423 } | |
424 } | |
425 } | |
426 } | |
427 throw "Incorrect number or type of arguments"; | |
428 } | |
429 static void _drawImageFromRect(receiver, image) native; | |
430 static void _drawImageFromRect_2(receiver, image, sx) native; | |
431 static void _drawImageFromRect_3(receiver, image, sx, sy) native; | |
432 static void _drawImageFromRect_4(receiver, image, sx, sy, sw) native; | |
433 static void _drawImageFromRect_5(receiver, image, sx, sy, sw, sh) native; | |
434 static void _drawImageFromRect_6(receiver, image, sx, sy, sw, sh, dx) native; | |
435 static void _drawImageFromRect_7(receiver, image, sx, sy, sw, sh, dx, dy) nati
ve; | |
436 static void _drawImageFromRect_8(receiver, image, sx, sy, sw, sh, dx, dy, dw)
native; | |
437 static void _drawImageFromRect_9(receiver, image, sx, sy, sw, sh, dx, dy, dw,
dh) native; | |
438 static void _drawImageFromRect_10(receiver, image, sx, sy, sw, sh, dx, dy, dw,
dh, compositeOperation) native; | |
439 | |
440 void fill() { | |
441 _fill(this); | |
442 return; | |
443 } | |
444 static void _fill(receiver) native; | |
445 | |
446 void fillRect(num x, num y, num width, num height) { | |
447 _fillRect(this, x, y, width, height); | |
448 return; | |
449 } | |
450 static void _fillRect(receiver, x, y, width, height) native; | |
451 | |
452 void fillText(String text, num x, num y, [num maxWidth = null]) { | |
453 if (maxWidth === null) { | |
454 _fillText(this, text, x, y); | |
455 return; | |
456 } else { | |
457 _fillText_2(this, text, x, y, maxWidth); | |
458 return; | |
459 } | |
460 } | |
461 static void _fillText(receiver, text, x, y) native; | |
462 static void _fillText_2(receiver, text, x, y, maxWidth) native; | |
463 | |
464 ImageData getImageData(num sx, num sy, num sw, num sh) { | |
465 return _getImageData(this, sx, sy, sw, sh); | |
466 } | |
467 static ImageData _getImageData(receiver, sx, sy, sw, sh) native; | |
468 | |
469 bool isPointInPath(num x, num y) { | |
470 return _isPointInPath(this, x, y); | |
471 } | |
472 static bool _isPointInPath(receiver, x, y) native; | |
473 | |
474 void lineTo(num x, num y) { | |
475 _lineTo(this, x, y); | |
476 return; | |
477 } | |
478 static void _lineTo(receiver, x, y) native; | |
479 | |
480 TextMetrics measureText(String text) { | |
481 return _measureText(this, text); | |
482 } | |
483 static TextMetrics _measureText(receiver, text) native; | |
484 | |
485 void moveTo(num x, num y) { | |
486 _moveTo(this, x, y); | |
487 return; | |
488 } | |
489 static void _moveTo(receiver, x, y) native; | |
490 | |
491 void putImageData(ImageData imagedata, num dx, num dy, [num dirtyX = null, num
dirtyY = null, num dirtyWidth = null, num dirtyHeight = null]) { | |
492 if (dirtyX === null) { | |
493 if (dirtyY === null) { | |
494 if (dirtyWidth === null) { | |
495 if (dirtyHeight === null) { | |
496 _putImageData(this, imagedata, dx, dy); | |
497 return; | |
498 } | |
499 } | |
500 } | |
501 } else { | |
502 _putImageData_2(this, imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirty
Height); | |
503 return; | |
504 } | |
505 throw "Incorrect number or type of arguments"; | |
506 } | |
507 static void _putImageData(receiver, imagedata, dx, dy) native; | |
508 static void _putImageData_2(receiver, imagedata, dx, dy, dirtyX, dirtyY, dirty
Width, dirtyHeight) native; | |
509 | |
510 void quadraticCurveTo(num cpx, num cpy, num x, num y) { | |
511 _quadraticCurveTo(this, cpx, cpy, x, y); | |
512 return; | |
513 } | |
514 static void _quadraticCurveTo(receiver, cpx, cpy, x, y) native; | |
515 | |
516 void rect(num x, num y, num width, num height) { | |
517 _rect(this, x, y, width, height); | |
518 return; | |
519 } | |
520 static void _rect(receiver, x, y, width, height) native; | |
521 | |
522 void restore() { | |
523 _restore(this); | |
524 return; | |
525 } | |
526 static void _restore(receiver) native; | |
527 | |
528 void rotate(num angle) { | |
529 _rotate(this, angle); | |
530 return; | |
531 } | |
532 static void _rotate(receiver, angle) native; | |
533 | |
534 void save() { | |
535 _save(this); | |
536 return; | |
537 } | |
538 static void _save(receiver) native; | |
539 | |
540 void scale(num sx, num sy) { | |
541 _scale(this, sx, sy); | |
542 return; | |
543 } | |
544 static void _scale(receiver, sx, sy) native; | |
545 | |
546 void setAlpha(num alpha) { | |
547 _setAlpha(this, alpha); | |
548 return; | |
549 } | |
550 static void _setAlpha(receiver, alpha) native; | |
551 | |
552 void setCompositeOperation(String compositeOperation) { | |
553 _setCompositeOperation(this, compositeOperation); | |
554 return; | |
555 } | |
556 static void _setCompositeOperation(receiver, compositeOperation) native; | |
557 | |
558 void setFillColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m = nul
l, num b_OR_y = null, num a_OR_k = null, num a = null]) { | |
559 if (c_OR_color_OR_grayLevel_OR_r is String) { | |
560 if (alpha_OR_g_OR_m === null) { | |
561 if (b_OR_y === null) { | |
562 if (a_OR_k === null) { | |
563 if (a === null) { | |
564 _setFillColor(this, c_OR_color_OR_grayLevel_OR_r); | |
565 return; | |
566 } | |
567 } | |
568 } | |
569 } else { | |
570 if (b_OR_y === null) { | |
571 if (a_OR_k === null) { | |
572 if (a === null) { | |
573 _setFillColor_2(this, c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_
m); | |
574 return; | |
575 } | |
576 } | |
577 } | |
578 } | |
579 } else { | |
580 if (c_OR_color_OR_grayLevel_OR_r is num) { | |
581 if (alpha_OR_g_OR_m === null) { | |
582 if (b_OR_y === null) { | |
583 if (a_OR_k === null) { | |
584 if (a === null) { | |
585 _setFillColor_3(this, c_OR_color_OR_grayLevel_OR_r); | |
586 return; | |
587 } | |
588 } | |
589 } | |
590 } else { | |
591 if (b_OR_y === null) { | |
592 if (a_OR_k === null) { | |
593 if (a === null) { | |
594 _setFillColor_4(this, c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_O
R_m); | |
595 return; | |
596 } | |
597 } | |
598 } else { | |
599 if (a === null) { | |
600 _setFillColor_5(this, c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_
m, b_OR_y, a_OR_k); | |
601 return; | |
602 } else { | |
603 _setFillColor_6(this, c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_OR_
m, b_OR_y, a_OR_k, a); | |
604 return; | |
605 } | |
606 } | |
607 } | |
608 } | |
609 } | |
610 throw "Incorrect number or type of arguments"; | |
611 } | |
612 static void _setFillColor(receiver, c_OR_color_OR_grayLevel_OR_r) native; | |
613 static void _setFillColor_2(receiver, c_OR_color_OR_grayLevel_OR_r, alpha_OR_g
_OR_m) native; | |
614 static void _setFillColor_3(receiver, c_OR_color_OR_grayLevel_OR_r) native; | |
615 static void _setFillColor_4(receiver, c_OR_color_OR_grayLevel_OR_r, alpha_OR_g
_OR_m) native; | |
616 static void _setFillColor_5(receiver, c_OR_color_OR_grayLevel_OR_r, alpha_OR_g
_OR_m, b_OR_y, a_OR_k) native; | |
617 static void _setFillColor_6(receiver, c_OR_color_OR_grayLevel_OR_r, alpha_OR_g
_OR_m, b_OR_y, a_OR_k, a) native; | |
618 | |
619 void setLineCap(String cap) { | |
620 _setLineCap(this, cap); | |
621 return; | |
622 } | |
623 static void _setLineCap(receiver, cap) native; | |
624 | |
625 void setLineJoin(String join) { | |
626 _setLineJoin(this, join); | |
627 return; | |
628 } | |
629 static void _setLineJoin(receiver, join) native; | |
630 | |
631 void setLineWidth(num width) { | |
632 _setLineWidth(this, width); | |
633 return; | |
634 } | |
635 static void _setLineWidth(receiver, width) native; | |
636 | |
637 void setMiterLimit(num limit) { | |
638 _setMiterLimit(this, limit); | |
639 return; | |
640 } | |
641 static void _setMiterLimit(receiver, limit) native; | |
642 | |
643 void setShadow(num width, num height, num blur, [var c_OR_color_OR_grayLevel_O
R_r = null, num alpha_OR_g_OR_m = null, num b_OR_y = null, num a_OR_k = null, nu
m a = null]) { | |
644 if (c_OR_color_OR_grayLevel_OR_r === null) { | |
645 if (alpha_OR_g_OR_m === null) { | |
646 if (b_OR_y === null) { | |
647 if (a_OR_k === null) { | |
648 if (a === null) { | |
649 _setShadow(this, width, height, blur); | |
650 return; | |
651 } | |
652 } | |
653 } | |
654 } | |
655 } else { | |
656 if (c_OR_color_OR_grayLevel_OR_r is String) { | |
657 if (alpha_OR_g_OR_m === null) { | |
658 if (b_OR_y === null) { | |
659 if (a_OR_k === null) { | |
660 if (a === null) { | |
661 _setShadow_2(this, width, height, blur, c_OR_color_OR_grayLevel_
OR_r); | |
662 return; | |
663 } | |
664 } | |
665 } | |
666 } else { | |
667 if (b_OR_y === null) { | |
668 if (a_OR_k === null) { | |
669 if (a === null) { | |
670 _setShadow_3(this, width, height, blur, c_OR_color_OR_grayLevel_
OR_r, alpha_OR_g_OR_m); | |
671 return; | |
672 } | |
673 } | |
674 } | |
675 } | |
676 } else { | |
677 if (c_OR_color_OR_grayLevel_OR_r is num) { | |
678 if (alpha_OR_g_OR_m === null) { | |
679 if (b_OR_y === null) { | |
680 if (a_OR_k === null) { | |
681 if (a === null) { | |
682 _setShadow_4(this, width, height, blur, c_OR_color_OR_grayLeve
l_OR_r); | |
683 return; | |
684 } | |
685 } | |
686 } | |
687 } else { | |
688 if (b_OR_y === null) { | |
689 if (a_OR_k === null) { | |
690 if (a === null) { | |
691 _setShadow_5(this, width, height, blur, c_OR_color_OR_grayLeve
l_OR_r, alpha_OR_g_OR_m); | |
692 return; | |
693 } | |
694 } | |
695 } else { | |
696 if (a === null) { | |
697 _setShadow_6(this, width, height, blur, c_OR_color_OR_grayLevel_
OR_r, alpha_OR_g_OR_m, b_OR_y, a_OR_k); | |
698 return; | |
699 } else { | |
700 _setShadow_7(this, width, height, blur, c_OR_color_OR_grayLevel_
OR_r, alpha_OR_g_OR_m, b_OR_y, a_OR_k, a); | |
701 return; | |
702 } | |
703 } | |
704 } | |
705 } | |
706 } | |
707 } | |
708 throw "Incorrect number or type of arguments"; | |
709 } | |
710 static void _setShadow(receiver, width, height, blur) native; | |
711 static void _setShadow_2(receiver, width, height, blur, c_OR_color_OR_grayLeve
l_OR_r) native; | |
712 static void _setShadow_3(receiver, width, height, blur, c_OR_color_OR_grayLeve
l_OR_r, alpha_OR_g_OR_m) native; | |
713 static void _setShadow_4(receiver, width, height, blur, c_OR_color_OR_grayLeve
l_OR_r) native; | |
714 static void _setShadow_5(receiver, width, height, blur, c_OR_color_OR_grayLeve
l_OR_r, alpha_OR_g_OR_m) native; | |
715 static void _setShadow_6(receiver, width, height, blur, c_OR_color_OR_grayLeve
l_OR_r, alpha_OR_g_OR_m, b_OR_y, a_OR_k) native; | |
716 static void _setShadow_7(receiver, width, height, blur, c_OR_color_OR_grayLeve
l_OR_r, alpha_OR_g_OR_m, b_OR_y, a_OR_k, a) native; | |
717 | |
718 void setStrokeColor(var c_OR_color_OR_grayLevel_OR_r, [num alpha_OR_g_OR_m = n
ull, num b_OR_y = null, num a_OR_k = null, num a = null]) { | |
719 if (c_OR_color_OR_grayLevel_OR_r is String) { | |
720 if (alpha_OR_g_OR_m === null) { | |
721 if (b_OR_y === null) { | |
722 if (a_OR_k === null) { | |
723 if (a === null) { | |
724 _setStrokeColor(this, c_OR_color_OR_grayLevel_OR_r); | |
725 return; | |
726 } | |
727 } | |
728 } | |
729 } else { | |
730 if (b_OR_y === null) { | |
731 if (a_OR_k === null) { | |
732 if (a === null) { | |
733 _setStrokeColor_2(this, c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_O
R_m); | |
734 return; | |
735 } | |
736 } | |
737 } | |
738 } | |
739 } else { | |
740 if (c_OR_color_OR_grayLevel_OR_r is num) { | |
741 if (alpha_OR_g_OR_m === null) { | |
742 if (b_OR_y === null) { | |
743 if (a_OR_k === null) { | |
744 if (a === null) { | |
745 _setStrokeColor_3(this, c_OR_color_OR_grayLevel_OR_r); | |
746 return; | |
747 } | |
748 } | |
749 } | |
750 } else { | |
751 if (b_OR_y === null) { | |
752 if (a_OR_k === null) { | |
753 if (a === null) { | |
754 _setStrokeColor_4(this, c_OR_color_OR_grayLevel_OR_r, alpha_OR_g
_OR_m); | |
755 return; | |
756 } | |
757 } | |
758 } else { | |
759 if (a === null) { | |
760 _setStrokeColor_5(this, c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_O
R_m, b_OR_y, a_OR_k); | |
761 return; | |
762 } else { | |
763 _setStrokeColor_6(this, c_OR_color_OR_grayLevel_OR_r, alpha_OR_g_O
R_m, b_OR_y, a_OR_k, a); | |
764 return; | |
765 } | |
766 } | |
767 } | |
768 } | |
769 } | |
770 throw "Incorrect number or type of arguments"; | |
771 } | |
772 static void _setStrokeColor(receiver, c_OR_color_OR_grayLevel_OR_r) native; | |
773 static void _setStrokeColor_2(receiver, c_OR_color_OR_grayLevel_OR_r, alpha_OR
_g_OR_m) native; | |
774 static void _setStrokeColor_3(receiver, c_OR_color_OR_grayLevel_OR_r) native; | |
775 static void _setStrokeColor_4(receiver, c_OR_color_OR_grayLevel_OR_r, alpha_OR
_g_OR_m) native; | |
776 static void _setStrokeColor_5(receiver, c_OR_color_OR_grayLevel_OR_r, alpha_OR
_g_OR_m, b_OR_y, a_OR_k) native; | |
777 static void _setStrokeColor_6(receiver, c_OR_color_OR_grayLevel_OR_r, alpha_OR
_g_OR_m, b_OR_y, a_OR_k, a) native; | |
778 | |
779 void setTransform(num m11, num m12, num m21, num m22, num dx, num dy) { | |
780 _setTransform(this, m11, m12, m21, m22, dx, dy); | |
781 return; | |
782 } | |
783 static void _setTransform(receiver, m11, m12, m21, m22, dx, dy) native; | |
784 | |
785 void stroke() { | |
786 _stroke(this); | |
787 return; | |
788 } | |
789 static void _stroke(receiver) native; | |
790 | |
791 void strokeRect(num x, num y, num width, num height, [num lineWidth = null]) { | |
792 if (lineWidth === null) { | |
793 _strokeRect(this, x, y, width, height); | |
794 return; | |
795 } else { | |
796 _strokeRect_2(this, x, y, width, height, lineWidth); | |
797 return; | |
798 } | |
799 } | |
800 static void _strokeRect(receiver, x, y, width, height) native; | |
801 static void _strokeRect_2(receiver, x, y, width, height, lineWidth) native; | |
802 | |
803 void strokeText(String text, num x, num y, [num maxWidth = null]) { | |
804 if (maxWidth === null) { | |
805 _strokeText(this, text, x, y); | |
806 return; | |
807 } else { | |
808 _strokeText_2(this, text, x, y, maxWidth); | |
809 return; | |
810 } | |
811 } | |
812 static void _strokeText(receiver, text, x, y) native; | |
813 static void _strokeText_2(receiver, text, x, y, maxWidth) native; | |
814 | |
815 void transform(num m11, num m12, num m21, num m22, num dx, num dy) { | |
816 _transform(this, m11, m12, m21, m22, dx, dy); | |
817 return; | |
818 } | |
819 static void _transform(receiver, m11, m12, m21, m22, dx, dy) native; | |
820 | |
821 void translate(num tx, num ty) { | |
822 _translate(this, tx, ty); | |
823 return; | |
824 } | |
825 static void _translate(receiver, tx, ty) native; | |
826 | |
827 String get typeName() { return "CanvasRenderingContext2D"; } | |
828 } | |
OLD | NEW |