| 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 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 7 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 8 $!MEMBERS | 8 $!MEMBERS |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 * [s], [l] are in percent, 0-100. | 39 * [s], [l] are in percent, 0-100. |
| 40 * [a] is 0-1. | 40 * [a] is 0-1. |
| 41 */ | 41 */ |
| 42 void setStrokeColorHsl(int h, num s, num l, [num a = 1]) { | 42 void setStrokeColorHsl(int h, num s, num l, [num a = 1]) { |
| 43 this.strokeStyle = 'hsla($h, $s%, $l%, $a)'; | 43 this.strokeStyle = 'hsla($h, $s%, $l%, $a)'; |
| 44 } | 44 } |
| 45 | 45 |
| 46 @DomName('CanvasRenderingContext2D.arc') | 46 @DomName('CanvasRenderingContext2D.arc') |
| 47 void arc(num x, num y, num radius, num startAngle, num endAngle, | 47 void arc(num x, num y, num radius, num startAngle, num endAngle, |
| 48 [bool anticlockwise = false]) { | 48 [bool anticlockwise = false]) { |
| 49 $dom_arc(x, y, radius, startAngle, endAngle, anticlockwise); | 49 _arc(x, y, radius, startAngle, endAngle, anticlockwise); |
| 50 } | 50 } |
| 51 | 51 |
| 52 /** | 52 /** |
| 53 * Draws an image from a CanvasImageSource to an area of this canvas. | 53 * Draws an image from a CanvasImageSource to an area of this canvas. |
| 54 * | 54 * |
| 55 * The image will be drawn to an area of this canvas defined by | 55 * The image will be drawn to an area of this canvas defined by |
| 56 * [destRect]. [sourceRect] defines the region of the source image that is | 56 * [destRect]. [sourceRect] defines the region of the source image that is |
| 57 * drawn. | 57 * drawn. |
| 58 * If [sourceRect] is not provided, then | 58 * If [sourceRect] is not provided, then |
| 59 * the entire rectangular image from [source] will be drawn to this context. | 59 * the entire rectangular image from [source] will be drawn to this context. |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 @DomName('CanvasRenderingContext2D.lineDashOffset') | 260 @DomName('CanvasRenderingContext2D.lineDashOffset') |
| 261 void set lineDashOffset(num value) => JS('void', | 261 void set lineDashOffset(num value) => JS('void', |
| 262 'typeof #.lineDashOffset != "undefined" ? #.lineDashOffset = # : ' | 262 'typeof #.lineDashOffset != "undefined" ? #.lineDashOffset = # : ' |
| 263 '#.webkitLineDashOffset = #', this, this, value, this, value); | 263 '#.webkitLineDashOffset = #', this, this, value, this, value); |
| 264 $else | 264 $else |
| 265 // TODO(amouravski): Add Dartium native methods for drawImage once we figure | 265 // TODO(amouravski): Add Dartium native methods for drawImage once we figure |
| 266 // out how to not break native bindings. | 266 // out how to not break native bindings. |
| 267 $endif | 267 $endif |
| 268 } | 268 } |
| 269 | 269 |
| OLD | NEW |