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