OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
6 | 6 |
7 abstract class CanvasRenderingContext { | 7 abstract class CanvasRenderingContext { |
8 CanvasElement get canvas; | 8 CanvasElement get canvas; |
9 } | 9 } |
10 | 10 |
11 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS implements
CanvasRenderingContext { | 11 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS implements
CanvasRenderingContext { |
12 $!MEMBERS | 12 $!MEMBERS |
13 | 13 |
14 @DomName('CanvasRenderingContext2D.createImageDataFromImageData') | 14 @DomName('CanvasRenderingContext2D.createImageDataFromImageData') |
15 @DocsEditable() | 15 @DocsEditable() |
16 ImageData createImageDataFromImageData(ImageData imagedata) => | 16 ImageData createImageDataFromImageData(ImageData imagedata) => |
17 $if DART2JS | 17 $if DART2JS |
18 JS('ImageData', '#.createImageData(#, #, null)', this, imagedata); | 18 JS('ImageData', '#.createImageData(#)', this, imagedata); |
19 $else | 19 $else |
20 this.createImageData(imagedata); | 20 this.createImageData(imagedata); |
21 $endif | 21 $endif |
22 | 22 |
23 /** | 23 /** |
24 * Sets the color used inside shapes. | 24 * Sets the color used inside shapes. |
25 * [r], [g], [b] are 0-255, [a] is 0-1. | 25 * [r], [g], [b] are 0-255, [a] is 0-1. |
26 */ | 26 */ |
27 void setFillColorRgb(int r, int g, int b, [num a = 1]) { | 27 void setFillColorRgb(int r, int g, int b, [num a = 1]) { |
28 this.fillStyle = 'rgba($r, $g, $b, $a)'; | 28 this.fillStyle = 'rgba($r, $g, $b, $a)'; |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 JS('void', '#.fill(#)', this, winding); | 377 JS('void', '#.fill(#)', this, winding); |
378 } | 378 } |
379 $endif | 379 $endif |
380 | 380 |
381 /** Deprecated always returns 1.0 */ | 381 /** Deprecated always returns 1.0 */ |
382 @DomName('CanvasRenderingContext2D.webkitBackingStorePixelRation') | 382 @DomName('CanvasRenderingContext2D.webkitBackingStorePixelRation') |
383 @Experimental() | 383 @Experimental() |
384 @deprecated | 384 @deprecated |
385 double get backingStorePixelRatio => 1.0; | 385 double get backingStorePixelRatio => 1.0; |
386 } | 386 } |
OLD | NEW |