| 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 $!TOPLEVEL |
| 8 |
| 7 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS implements CanvasImageS
ource$IMPLEMENTS$NATIVESPEC { | 9 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS implements CanvasImageS
ource$IMPLEMENTS$NATIVESPEC { |
| 8 $!MEMBERS | 10 $!MEMBERS |
| 9 /** An API for drawing on this canvas. */ | 11 /** An API for drawing on this canvas. */ |
| 10 $if DART2JS | 12 $if DART2JS |
| 11 CanvasRenderingContext2D get context2D => | 13 CanvasRenderingContext2D get context2D => |
| 12 JS('Null|CanvasRenderingContext2D', '#.getContext(#)', this, '2d'); | 14 JS('Null|CanvasRenderingContext2D', '#.getContext(#)', this, '2d'); |
| 13 $else | 15 $else |
| 14 CanvasRenderingContext2D get context2D => getContext('2d'); | 16 CanvasRenderingContext2D get context2D => getContext('2d'); |
| 15 $endif | 17 $endif |
| 16 | 18 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 * | 84 * |
| 83 * * [Data URI Scheme](http://en.wikipedia.org/wiki/Data_URI_scheme) from Wiki
pedia. | 85 * * [Data URI Scheme](http://en.wikipedia.org/wiki/Data_URI_scheme) from Wiki
pedia. |
| 84 * | 86 * |
| 85 * * [HTMLCanvasElement](https://developer.mozilla.org/en-US/docs/DOM/HTMLCanv
asElement) from MDN. | 87 * * [HTMLCanvasElement](https://developer.mozilla.org/en-US/docs/DOM/HTMLCanv
asElement) from MDN. |
| 86 * | 88 * |
| 87 * * [toDataUrl](http://dev.w3.org/html5/spec/the-canvas-element.html#dom-canv
as-todataurl) from W3C. | 89 * * [toDataUrl](http://dev.w3.org/html5/spec/the-canvas-element.html#dom-canv
as-todataurl) from W3C. |
| 88 */ | 90 */ |
| 89 String toDataUrl([String type = 'image/png', num quality]) => | 91 String toDataUrl([String type = 'image/png', num quality]) => |
| 90 _toDataUrl(type, quality); | 92 _toDataUrl(type, quality); |
| 91 } | 93 } |
| OLD | NEW |