OLD | NEW |
(Empty) | |
| 1 |
| 2 class _CanvasRenderingContext2DImpl extends _CanvasRenderingContextImpl implemen
ts CanvasRenderingContext2D { |
| 3 _CanvasRenderingContext2DImpl._wrap(ptr) : super._wrap(ptr); |
| 4 |
| 5 Dynamic get fillStyle() => _wrap(_ptr.fillStyle); |
| 6 |
| 7 void set fillStyle(Dynamic value) { _ptr.fillStyle = _unwrap(value); } |
| 8 |
| 9 String get font() => _wrap(_ptr.font); |
| 10 |
| 11 void set font(String value) { _ptr.font = _unwrap(value); } |
| 12 |
| 13 num get globalAlpha() => _wrap(_ptr.globalAlpha); |
| 14 |
| 15 void set globalAlpha(num value) { _ptr.globalAlpha = _unwrap(value); } |
| 16 |
| 17 String get globalCompositeOperation() => _wrap(_ptr.globalCompositeOperation); |
| 18 |
| 19 void set globalCompositeOperation(String value) { _ptr.globalCompositeOperatio
n = _unwrap(value); } |
| 20 |
| 21 String get lineCap() => _wrap(_ptr.lineCap); |
| 22 |
| 23 void set lineCap(String value) { _ptr.lineCap = _unwrap(value); } |
| 24 |
| 25 String get lineJoin() => _wrap(_ptr.lineJoin); |
| 26 |
| 27 void set lineJoin(String value) { _ptr.lineJoin = _unwrap(value); } |
| 28 |
| 29 num get lineWidth() => _wrap(_ptr.lineWidth); |
| 30 |
| 31 void set lineWidth(num value) { _ptr.lineWidth = _unwrap(value); } |
| 32 |
| 33 num get miterLimit() => _wrap(_ptr.miterLimit); |
| 34 |
| 35 void set miterLimit(num value) { _ptr.miterLimit = _unwrap(value); } |
| 36 |
| 37 num get shadowBlur() => _wrap(_ptr.shadowBlur); |
| 38 |
| 39 void set shadowBlur(num value) { _ptr.shadowBlur = _unwrap(value); } |
| 40 |
| 41 String get shadowColor() => _wrap(_ptr.shadowColor); |
| 42 |
| 43 void set shadowColor(String value) { _ptr.shadowColor = _unwrap(value); } |
| 44 |
| 45 num get shadowOffsetX() => _wrap(_ptr.shadowOffsetX); |
| 46 |
| 47 void set shadowOffsetX(num value) { _ptr.shadowOffsetX = _unwrap(value); } |
| 48 |
| 49 num get shadowOffsetY() => _wrap(_ptr.shadowOffsetY); |
| 50 |
| 51 void set shadowOffsetY(num value) { _ptr.shadowOffsetY = _unwrap(value); } |
| 52 |
| 53 Dynamic get strokeStyle() => _wrap(_ptr.strokeStyle); |
| 54 |
| 55 void set strokeStyle(Dynamic value) { _ptr.strokeStyle = _unwrap(value); } |
| 56 |
| 57 String get textAlign() => _wrap(_ptr.textAlign); |
| 58 |
| 59 void set textAlign(String value) { _ptr.textAlign = _unwrap(value); } |
| 60 |
| 61 String get textBaseline() => _wrap(_ptr.textBaseline); |
| 62 |
| 63 void set textBaseline(String value) { _ptr.textBaseline = _unwrap(value); } |
| 64 |
| 65 List get webkitLineDash() => _wrap(_ptr.webkitLineDash); |
| 66 |
| 67 void set webkitLineDash(List value) { _ptr.webkitLineDash = _unwrap(value); } |
| 68 |
| 69 num get webkitLineDashOffset() => _wrap(_ptr.webkitLineDashOffset); |
| 70 |
| 71 void set webkitLineDashOffset(num value) { _ptr.webkitLineDashOffset = _unwrap
(value); } |
| 72 |
| 73 void arc(num x, num y, num radius, num startAngle, num endAngle, bool anticloc
kwise) { |
| 74 _ptr.arc(_unwrap(x), _unwrap(y), _unwrap(radius), _unwrap(startAngle), _unwr
ap(endAngle), _unwrap(anticlockwise)); |
| 75 return; |
| 76 } |
| 77 |
| 78 void arcTo(num x1, num y1, num x2, num y2, num radius) { |
| 79 _ptr.arcTo(_unwrap(x1), _unwrap(y1), _unwrap(x2), _unwrap(y2), _unwrap(radiu
s)); |
| 80 return; |
| 81 } |
| 82 |
| 83 void beginPath() { |
| 84 _ptr.beginPath(); |
| 85 return; |
| 86 } |
| 87 |
| 88 void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) { |
| 89 _ptr.bezierCurveTo(_unwrap(cp1x), _unwrap(cp1y), _unwrap(cp2x), _unwrap(cp2y
), _unwrap(x), _unwrap(y)); |
| 90 return; |
| 91 } |
| 92 |
| 93 void clearRect(num x, num y, num width, num height) { |
| 94 _ptr.clearRect(_unwrap(x), _unwrap(y), _unwrap(width), _unwrap(height)); |
| 95 return; |
| 96 } |
| 97 |
| 98 void clearShadow() { |
| 99 _ptr.clearShadow(); |
| 100 return; |
| 101 } |
| 102 |
| 103 void clip() { |
| 104 _ptr.clip(); |
| 105 return; |
| 106 } |
| 107 |
| 108 void closePath() { |
| 109 _ptr.closePath(); |
| 110 return; |
| 111 } |
| 112 |
| 113 ImageData createImageData(var imagedata_OR_sw, [num sh = null]) { |
| 114 if (imagedata_OR_sw is ImageData) { |
| 115 if (sh === null) { |
| 116 return _wrap(_ptr.createImageData(_unwrap(imagedata_OR_sw))); |
| 117 } |
| 118 } else { |
| 119 if (imagedata_OR_sw is num) { |
| 120 return _wrap(_ptr.createImageData(_unwrap(imagedata_OR_sw), _unwrap(sh))
); |
| 121 } |
| 122 } |
| 123 throw "Incorrect number or type of arguments"; |
| 124 } |
| 125 |
| 126 CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) { |
| 127 return _wrap(_ptr.createLinearGradient(_unwrap(x0), _unwrap(y0), _unwrap(x1)
, _unwrap(y1))); |
| 128 } |
| 129 |
| 130 CanvasPattern createPattern(var canvas_OR_image, String repetitionType) { |
| 131 if (canvas_OR_image is CanvasElement) { |
| 132 return _wrap(_ptr.createPattern(_unwrap(canvas_OR_image), _unwrap(repetiti
onType))); |
| 133 } else { |
| 134 if (canvas_OR_image is ImageElement) { |
| 135 return _wrap(_ptr.createPattern(_unwrap(canvas_OR_image), _unwrap(repeti
tionType))); |
| 136 } |
| 137 } |
| 138 throw "Incorrect number or type of arguments"; |
| 139 } |
| 140 |
| 141 CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, nu
m r1) { |
| 142 return _wrap(_ptr.createRadialGradient(_unwrap(x0), _unwrap(y0), _unwrap(r0)
, _unwrap(x1), _unwrap(y1), _unwrap(r1))); |
| 143 } |
| 144 |
| 145 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]) { |
| 146 if (canvas_OR_image_OR_video is ImageElement) { |
| 147 if (sw_OR_width === null) { |
| 148 if (height_OR_sh === null) { |
| 149 if (dx === null) { |
| 150 if (dy === null) { |
| 151 if (dw === null) { |
| 152 if (dh === null) { |
| 153 _ptr.drawImage(_unwrap(canvas_OR_image_OR_video), _unwrap(sx_O
R_x), _unwrap(sy_OR_y)); |
| 154 return; |
| 155 } |
| 156 } |
| 157 } |
| 158 } |
| 159 } |
| 160 } else { |
| 161 if (dx === null) { |
| 162 if (dy === null) { |
| 163 if (dw === null) { |
| 164 if (dh === null) { |
| 165 _ptr.drawImage(_unwrap(canvas_OR_image_OR_video), _unwrap(sx_OR_
x), _unwrap(sy_OR_y), _unwrap(sw_OR_width), _unwrap(height_OR_sh)); |
| 166 return; |
| 167 } |
| 168 } |
| 169 } |
| 170 } else { |
| 171 _ptr.drawImage(_unwrap(canvas_OR_image_OR_video), _unwrap(sx_OR_x), _u
nwrap(sy_OR_y), _unwrap(sw_OR_width), _unwrap(height_OR_sh), _unwrap(dx), _unwra
p(dy), _unwrap(dw), _unwrap(dh)); |
| 172 return; |
| 173 } |
| 174 } |
| 175 } else { |
| 176 if (canvas_OR_image_OR_video is CanvasElement) { |
| 177 if (sw_OR_width === null) { |
| 178 if (height_OR_sh === null) { |
| 179 if (dx === null) { |
| 180 if (dy === null) { |
| 181 if (dw === null) { |
| 182 if (dh === null) { |
| 183 _ptr.drawImage(_unwrap(canvas_OR_image_OR_video), _unwrap(sx
_OR_x), _unwrap(sy_OR_y)); |
| 184 return; |
| 185 } |
| 186 } |
| 187 } |
| 188 } |
| 189 } |
| 190 } else { |
| 191 if (dx === null) { |
| 192 if (dy === null) { |
| 193 if (dw === null) { |
| 194 if (dh === null) { |
| 195 _ptr.drawImage(_unwrap(canvas_OR_image_OR_video), _unwrap(sx_O
R_x), _unwrap(sy_OR_y), _unwrap(sw_OR_width), _unwrap(height_OR_sh)); |
| 196 return; |
| 197 } |
| 198 } |
| 199 } |
| 200 } else { |
| 201 _ptr.drawImage(_unwrap(canvas_OR_image_OR_video), _unwrap(sx_OR_x),
_unwrap(sy_OR_y), _unwrap(sw_OR_width), _unwrap(height_OR_sh), _unwrap(dx), _unw
rap(dy), _unwrap(dw), _unwrap(dh)); |
| 202 return; |
| 203 } |
| 204 } |
| 205 } else { |
| 206 if (canvas_OR_image_OR_video is VideoElement) { |
| 207 if (sw_OR_width === null) { |
| 208 if (height_OR_sh === null) { |
| 209 if (dx === null) { |
| 210 if (dy === null) { |
| 211 if (dw === null) { |
| 212 if (dh === null) { |
| 213 _ptr.drawImage(_unwrap(canvas_OR_image_OR_video), _unwrap(
sx_OR_x), _unwrap(sy_OR_y)); |
| 214 return; |
| 215 } |
| 216 } |
| 217 } |
| 218 } |
| 219 } |
| 220 } else { |
| 221 if (dx === null) { |
| 222 if (dy === null) { |
| 223 if (dw === null) { |
| 224 if (dh === null) { |
| 225 _ptr.drawImage(_unwrap(canvas_OR_image_OR_video), _unwrap(sx
_OR_x), _unwrap(sy_OR_y), _unwrap(sw_OR_width), _unwrap(height_OR_sh)); |
| 226 return; |
| 227 } |
| 228 } |
| 229 } |
| 230 } else { |
| 231 _ptr.drawImage(_unwrap(canvas_OR_image_OR_video), _unwrap(sx_OR_x)
, _unwrap(sy_OR_y), _unwrap(sw_OR_width), _unwrap(height_OR_sh), _unwrap(dx), _u
nwrap(dy), _unwrap(dw), _unwrap(dh)); |
| 232 return; |
| 233 } |
| 234 } |
| 235 } |
| 236 } |
| 237 } |
| 238 throw "Incorrect number or type of arguments"; |
| 239 } |
| 240 |
| 241 void drawImageFromRect(ImageElement image, [num sx = null, num sy = null, num
sw = null, num sh = null, num dx = null, num dy = null, num dw = null, num dh =
null, String compositeOperation = null]) { |
| 242 if (sx === null) { |
| 243 if (sy === null) { |
| 244 if (sw === null) { |
| 245 if (sh === null) { |
| 246 if (dx === null) { |
| 247 if (dy === null) { |
| 248 if (dw === null) { |
| 249 if (dh === null) { |
| 250 if (compositeOperation === null) { |
| 251 _ptr.drawImageFromRect(_unwrap(image)); |
| 252 return; |
| 253 } |
| 254 } |
| 255 } |
| 256 } |
| 257 } |
| 258 } |
| 259 } |
| 260 } |
| 261 } else { |
| 262 if (sy === null) { |
| 263 if (sw === null) { |
| 264 if (sh === null) { |
| 265 if (dx === null) { |
| 266 if (dy === null) { |
| 267 if (dw === null) { |
| 268 if (dh === null) { |
| 269 if (compositeOperation === null) { |
| 270 _ptr.drawImageFromRect(_unwrap(image), _unwrap(sx)); |
| 271 return; |
| 272 } |
| 273 } |
| 274 } |
| 275 } |
| 276 } |
| 277 } |
| 278 } |
| 279 } else { |
| 280 if (sw === null) { |
| 281 if (sh === null) { |
| 282 if (dx === null) { |
| 283 if (dy === null) { |
| 284 if (dw === null) { |
| 285 if (dh === null) { |
| 286 if (compositeOperation === null) { |
| 287 _ptr.drawImageFromRect(_unwrap(image), _unwrap(sx), _unwra
p(sy)); |
| 288 return; |
| 289 } |
| 290 } |
| 291 } |
| 292 } |
| 293 } |
| 294 } |
| 295 } else { |
| 296 if (sh === null) { |
| 297 if (dx === null) { |
| 298 if (dy === null) { |
| 299 if (dw === null) { |
| 300 if (dh === null) { |
| 301 if (compositeOperation === null) { |
| 302 _ptr.drawImageFromRect(_unwrap(image), _unwrap(sx), _unwra
p(sy), _unwrap(sw)); |
| 303 return; |
| 304 } |
| 305 } |
| 306 } |
| 307 } |
| 308 } |
| 309 } else { |
| 310 if (dx === null) { |
| 311 if (dy === null) { |
| 312 if (dw === null) { |
| 313 if (dh === null) { |
| 314 if (compositeOperation === null) { |
| 315 _ptr.drawImageFromRect(_unwrap(image), _unwrap(sx), _unwra
p(sy), _unwrap(sw), _unwrap(sh)); |
| 316 return; |
| 317 } |
| 318 } |
| 319 } |
| 320 } |
| 321 } else { |
| 322 if (dy === null) { |
| 323 if (dw === null) { |
| 324 if (dh === null) { |
| 325 if (compositeOperation === null) { |
| 326 _ptr.drawImageFromRect(_unwrap(image), _unwrap(sx), _unwra
p(sy), _unwrap(sw), _unwrap(sh), _unwrap(dx)); |
| 327 return; |
| 328 } |
| 329 } |
| 330 } |
| 331 } else { |
| 332 if (dw === null) { |
| 333 if (dh === null) { |
| 334 if (compositeOperation === null) { |
| 335 _ptr.drawImageFromRect(_unwrap(image), _unwrap(sx), _unwra
p(sy), _unwrap(sw), _unwrap(sh), _unwrap(dx), _unwrap(dy)); |
| 336 return; |
| 337 } |
| 338 } |
| 339 } else { |
| 340 if (dh === null) { |
| 341 if (compositeOperation === null) { |
| 342 _ptr.drawImageFromRect(_unwrap(image), _unwrap(sx), _unwra
p(sy), _unwrap(sw), _unwrap(sh), _unwrap(dx), _unwrap(dy), _unwrap(dw)); |
| 343 return; |
| 344 } |
| 345 } else { |
| 346 if (compositeOperation === null) { |
| 347 _ptr.drawImageFromRect(_unwrap(image), _unwrap(sx), _unwra
p(sy), _unwrap(sw), _unwrap(sh), _unwrap(dx), _unwrap(dy), _unwrap(dw), _unwrap(
dh)); |
| 348 return; |
| 349 } else { |
| 350 _ptr.drawImageFromRect(_unwrap(image), _unwrap(sx), _unwra
p(sy), _unwrap(sw), _unwrap(sh), _unwrap(dx), _unwrap(dy), _unwrap(dw), _unwrap(
dh), _unwrap(compositeOperation)); |
| 351 return; |
| 352 } |
| 353 } |
| 354 } |
| 355 } |
| 356 } |
| 357 } |
| 358 } |
| 359 } |
| 360 } |
| 361 throw "Incorrect number or type of arguments"; |
| 362 } |
| 363 |
| 364 void fill() { |
| 365 _ptr.fill(); |
| 366 return; |
| 367 } |
| 368 |
| 369 void fillRect(num x, num y, num width, num height) { |
| 370 _ptr.fillRect(_unwrap(x), _unwrap(y), _unwrap(width), _unwrap(height)); |
| 371 return; |
| 372 } |
| 373 |
| 374 void fillText(String text, num x, num y, [num maxWidth = null]) { |
| 375 if (maxWidth === null) { |
| 376 _ptr.fillText(_unwrap(text), _unwrap(x), _unwrap(y)); |
| 377 return; |
| 378 } else { |
| 379 _ptr.fillText(_unwrap(text), _unwrap(x), _unwrap(y), _unwrap(maxWidth)); |
| 380 return; |
| 381 } |
| 382 } |
| 383 |
| 384 ImageData getImageData(num sx, num sy, num sw, num sh) { |
| 385 return _wrap(_ptr.getImageData(_unwrap(sx), _unwrap(sy), _unwrap(sw), _unwra
p(sh))); |
| 386 } |
| 387 |
| 388 bool isPointInPath(num x, num y) { |
| 389 return _wrap(_ptr.isPointInPath(_unwrap(x), _unwrap(y))); |
| 390 } |
| 391 |
| 392 void lineTo(num x, num y) { |
| 393 _ptr.lineTo(_unwrap(x), _unwrap(y)); |
| 394 return; |
| 395 } |
| 396 |
| 397 TextMetrics measureText(String text) { |
| 398 return _wrap(_ptr.measureText(_unwrap(text))); |
| 399 } |
| 400 |
| 401 void moveTo(num x, num y) { |
| 402 _ptr.moveTo(_unwrap(x), _unwrap(y)); |
| 403 return; |
| 404 } |
| 405 |
| 406 void putImageData(ImageData imagedata, num dx, num dy, [num dirtyX = null, num
dirtyY = null, num dirtyWidth = null, num dirtyHeight = null]) { |
| 407 if (dirtyX === null) { |
| 408 if (dirtyY === null) { |
| 409 if (dirtyWidth === null) { |
| 410 if (dirtyHeight === null) { |
| 411 _ptr.putImageData(_unwrap(imagedata), _unwrap(dx), _unwrap(dy)); |
| 412 return; |
| 413 } |
| 414 } |
| 415 } |
| 416 } else { |
| 417 _ptr.putImageData(_unwrap(imagedata), _unwrap(dx), _unwrap(dy), _unwrap(di
rtyX), _unwrap(dirtyY), _unwrap(dirtyWidth), _unwrap(dirtyHeight)); |
| 418 return; |
| 419 } |
| 420 throw "Incorrect number or type of arguments"; |
| 421 } |
| 422 |
| 423 void quadraticCurveTo(num cpx, num cpy, num x, num y) { |
| 424 _ptr.quadraticCurveTo(_unwrap(cpx), _unwrap(cpy), _unwrap(x), _unwrap(y)); |
| 425 return; |
| 426 } |
| 427 |
| 428 void rect(num x, num y, num width, num height) { |
| 429 _ptr.rect(_unwrap(x), _unwrap(y), _unwrap(width), _unwrap(height)); |
| 430 return; |
| 431 } |
| 432 |
| 433 void restore() { |
| 434 _ptr.restore(); |
| 435 return; |
| 436 } |
| 437 |
| 438 void rotate(num angle) { |
| 439 _ptr.rotate(_unwrap(angle)); |
| 440 return; |
| 441 } |
| 442 |
| 443 void save() { |
| 444 _ptr.save(); |
| 445 return; |
| 446 } |
| 447 |
| 448 void scale(num sx, num sy) { |
| 449 _ptr.scale(_unwrap(sx), _unwrap(sy)); |
| 450 return; |
| 451 } |
| 452 |
| 453 void setAlpha(num alpha) { |
| 454 _ptr.setAlpha(_unwrap(alpha)); |
| 455 return; |
| 456 } |
| 457 |
| 458 void setCompositeOperation(String compositeOperation) { |
| 459 _ptr.setCompositeOperation(_unwrap(compositeOperation)); |
| 460 return; |
| 461 } |
| 462 |
| 463 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]) { |
| 464 if (c_OR_color_OR_grayLevel_OR_r is String) { |
| 465 if (alpha_OR_g_OR_m === null) { |
| 466 if (b_OR_y === null) { |
| 467 if (a_OR_k === null) { |
| 468 if (a === null) { |
| 469 _ptr.setFillColor(_unwrap(c_OR_color_OR_grayLevel_OR_r)); |
| 470 return; |
| 471 } |
| 472 } |
| 473 } |
| 474 } else { |
| 475 if (b_OR_y === null) { |
| 476 if (a_OR_k === null) { |
| 477 if (a === null) { |
| 478 _ptr.setFillColor(_unwrap(c_OR_color_OR_grayLevel_OR_r), _unwrap(a
lpha_OR_g_OR_m)); |
| 479 return; |
| 480 } |
| 481 } |
| 482 } |
| 483 } |
| 484 } else { |
| 485 if (c_OR_color_OR_grayLevel_OR_r is num) { |
| 486 if (alpha_OR_g_OR_m === null) { |
| 487 if (b_OR_y === null) { |
| 488 if (a_OR_k === null) { |
| 489 if (a === null) { |
| 490 _ptr.setFillColor(_unwrap(c_OR_color_OR_grayLevel_OR_r)); |
| 491 return; |
| 492 } |
| 493 } |
| 494 } |
| 495 } else { |
| 496 if (b_OR_y === null) { |
| 497 if (a_OR_k === null) { |
| 498 if (a === null) { |
| 499 _ptr.setFillColor(_unwrap(c_OR_color_OR_grayLevel_OR_r), _unwrap
(alpha_OR_g_OR_m)); |
| 500 return; |
| 501 } |
| 502 } |
| 503 } else { |
| 504 if (a === null) { |
| 505 _ptr.setFillColor(_unwrap(c_OR_color_OR_grayLevel_OR_r), _unwrap(a
lpha_OR_g_OR_m), _unwrap(b_OR_y), _unwrap(a_OR_k)); |
| 506 return; |
| 507 } else { |
| 508 _ptr.setFillColor(_unwrap(c_OR_color_OR_grayLevel_OR_r), _unwrap(a
lpha_OR_g_OR_m), _unwrap(b_OR_y), _unwrap(a_OR_k), _unwrap(a)); |
| 509 return; |
| 510 } |
| 511 } |
| 512 } |
| 513 } |
| 514 } |
| 515 throw "Incorrect number or type of arguments"; |
| 516 } |
| 517 |
| 518 void setLineCap(String cap) { |
| 519 _ptr.setLineCap(_unwrap(cap)); |
| 520 return; |
| 521 } |
| 522 |
| 523 void setLineJoin(String join) { |
| 524 _ptr.setLineJoin(_unwrap(join)); |
| 525 return; |
| 526 } |
| 527 |
| 528 void setLineWidth(num width) { |
| 529 _ptr.setLineWidth(_unwrap(width)); |
| 530 return; |
| 531 } |
| 532 |
| 533 void setMiterLimit(num limit) { |
| 534 _ptr.setMiterLimit(_unwrap(limit)); |
| 535 return; |
| 536 } |
| 537 |
| 538 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]) { |
| 539 if (c_OR_color_OR_grayLevel_OR_r === null) { |
| 540 if (alpha_OR_g_OR_m === null) { |
| 541 if (b_OR_y === null) { |
| 542 if (a_OR_k === null) { |
| 543 if (a === null) { |
| 544 _ptr.setShadow(_unwrap(width), _unwrap(height), _unwrap(blur)); |
| 545 return; |
| 546 } |
| 547 } |
| 548 } |
| 549 } |
| 550 } else { |
| 551 if (c_OR_color_OR_grayLevel_OR_r is String) { |
| 552 if (alpha_OR_g_OR_m === null) { |
| 553 if (b_OR_y === null) { |
| 554 if (a_OR_k === null) { |
| 555 if (a === null) { |
| 556 _ptr.setShadow(_unwrap(width), _unwrap(height), _unwrap(blur), _
unwrap(c_OR_color_OR_grayLevel_OR_r)); |
| 557 return; |
| 558 } |
| 559 } |
| 560 } |
| 561 } else { |
| 562 if (b_OR_y === null) { |
| 563 if (a_OR_k === null) { |
| 564 if (a === null) { |
| 565 _ptr.setShadow(_unwrap(width), _unwrap(height), _unwrap(blur), _
unwrap(c_OR_color_OR_grayLevel_OR_r), _unwrap(alpha_OR_g_OR_m)); |
| 566 return; |
| 567 } |
| 568 } |
| 569 } |
| 570 } |
| 571 } else { |
| 572 if (c_OR_color_OR_grayLevel_OR_r is num) { |
| 573 if (alpha_OR_g_OR_m === null) { |
| 574 if (b_OR_y === null) { |
| 575 if (a_OR_k === null) { |
| 576 if (a === null) { |
| 577 _ptr.setShadow(_unwrap(width), _unwrap(height), _unwrap(blur),
_unwrap(c_OR_color_OR_grayLevel_OR_r)); |
| 578 return; |
| 579 } |
| 580 } |
| 581 } |
| 582 } else { |
| 583 if (b_OR_y === null) { |
| 584 if (a_OR_k === null) { |
| 585 if (a === null) { |
| 586 _ptr.setShadow(_unwrap(width), _unwrap(height), _unwrap(blur),
_unwrap(c_OR_color_OR_grayLevel_OR_r), _unwrap(alpha_OR_g_OR_m)); |
| 587 return; |
| 588 } |
| 589 } |
| 590 } else { |
| 591 if (a === null) { |
| 592 _ptr.setShadow(_unwrap(width), _unwrap(height), _unwrap(blur), _
unwrap(c_OR_color_OR_grayLevel_OR_r), _unwrap(alpha_OR_g_OR_m), _unwrap(b_OR_y),
_unwrap(a_OR_k)); |
| 593 return; |
| 594 } else { |
| 595 _ptr.setShadow(_unwrap(width), _unwrap(height), _unwrap(blur), _
unwrap(c_OR_color_OR_grayLevel_OR_r), _unwrap(alpha_OR_g_OR_m), _unwrap(b_OR_y),
_unwrap(a_OR_k), _unwrap(a)); |
| 596 return; |
| 597 } |
| 598 } |
| 599 } |
| 600 } |
| 601 } |
| 602 } |
| 603 throw "Incorrect number or type of arguments"; |
| 604 } |
| 605 |
| 606 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]) { |
| 607 if (c_OR_color_OR_grayLevel_OR_r is String) { |
| 608 if (alpha_OR_g_OR_m === null) { |
| 609 if (b_OR_y === null) { |
| 610 if (a_OR_k === null) { |
| 611 if (a === null) { |
| 612 _ptr.setStrokeColor(_unwrap(c_OR_color_OR_grayLevel_OR_r)); |
| 613 return; |
| 614 } |
| 615 } |
| 616 } |
| 617 } else { |
| 618 if (b_OR_y === null) { |
| 619 if (a_OR_k === null) { |
| 620 if (a === null) { |
| 621 _ptr.setStrokeColor(_unwrap(c_OR_color_OR_grayLevel_OR_r), _unwrap
(alpha_OR_g_OR_m)); |
| 622 return; |
| 623 } |
| 624 } |
| 625 } |
| 626 } |
| 627 } else { |
| 628 if (c_OR_color_OR_grayLevel_OR_r is num) { |
| 629 if (alpha_OR_g_OR_m === null) { |
| 630 if (b_OR_y === null) { |
| 631 if (a_OR_k === null) { |
| 632 if (a === null) { |
| 633 _ptr.setStrokeColor(_unwrap(c_OR_color_OR_grayLevel_OR_r)); |
| 634 return; |
| 635 } |
| 636 } |
| 637 } |
| 638 } else { |
| 639 if (b_OR_y === null) { |
| 640 if (a_OR_k === null) { |
| 641 if (a === null) { |
| 642 _ptr.setStrokeColor(_unwrap(c_OR_color_OR_grayLevel_OR_r), _unwr
ap(alpha_OR_g_OR_m)); |
| 643 return; |
| 644 } |
| 645 } |
| 646 } else { |
| 647 if (a === null) { |
| 648 _ptr.setStrokeColor(_unwrap(c_OR_color_OR_grayLevel_OR_r), _unwrap
(alpha_OR_g_OR_m), _unwrap(b_OR_y), _unwrap(a_OR_k)); |
| 649 return; |
| 650 } else { |
| 651 _ptr.setStrokeColor(_unwrap(c_OR_color_OR_grayLevel_OR_r), _unwrap
(alpha_OR_g_OR_m), _unwrap(b_OR_y), _unwrap(a_OR_k), _unwrap(a)); |
| 652 return; |
| 653 } |
| 654 } |
| 655 } |
| 656 } |
| 657 } |
| 658 throw "Incorrect number or type of arguments"; |
| 659 } |
| 660 |
| 661 void setTransform(num m11, num m12, num m21, num m22, num dx, num dy) { |
| 662 _ptr.setTransform(_unwrap(m11), _unwrap(m12), _unwrap(m21), _unwrap(m22), _u
nwrap(dx), _unwrap(dy)); |
| 663 return; |
| 664 } |
| 665 |
| 666 void stroke() { |
| 667 _ptr.stroke(); |
| 668 return; |
| 669 } |
| 670 |
| 671 void strokeRect(num x, num y, num width, num height, [num lineWidth = null]) { |
| 672 if (lineWidth === null) { |
| 673 _ptr.strokeRect(_unwrap(x), _unwrap(y), _unwrap(width), _unwrap(height)); |
| 674 return; |
| 675 } else { |
| 676 _ptr.strokeRect(_unwrap(x), _unwrap(y), _unwrap(width), _unwrap(height), _
unwrap(lineWidth)); |
| 677 return; |
| 678 } |
| 679 } |
| 680 |
| 681 void strokeText(String text, num x, num y, [num maxWidth = null]) { |
| 682 if (maxWidth === null) { |
| 683 _ptr.strokeText(_unwrap(text), _unwrap(x), _unwrap(y)); |
| 684 return; |
| 685 } else { |
| 686 _ptr.strokeText(_unwrap(text), _unwrap(x), _unwrap(y), _unwrap(maxWidth)); |
| 687 return; |
| 688 } |
| 689 } |
| 690 |
| 691 void transform(num m11, num m12, num m21, num m22, num dx, num dy) { |
| 692 _ptr.transform(_unwrap(m11), _unwrap(m12), _unwrap(m21), _unwrap(m22), _unwr
ap(dx), _unwrap(dy)); |
| 693 return; |
| 694 } |
| 695 |
| 696 void translate(num tx, num ty) { |
| 697 _ptr.translate(_unwrap(tx), _unwrap(ty)); |
| 698 return; |
| 699 } |
| 700 } |
OLD | NEW |