Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: dart/tools/dom/src/CanvasImageSource.dart

Issue 60733003: Version 0.8.10.6 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 html; 5 part of html;
6 6
7 /** 7 /**
8 * An object that can be drawn to a [CanvasRenderingContext2D] object with 8 * An object that can be drawn to a 2D canvas rendering context.
9 * [CanvasRenderingContext2D.drawImage],
10 * [CanvasRenderingContext2D.drawImageToRect],
11 * [CanvasRenderingContext2D.drawImageScaled], or
12 * [CanvasRenderingContext2D.drawImageScaledFromSource].
13 * 9 *
14 * If the CanvasImageSource is an [ImageElement] then the element's image is 10 * This object is either an [ImageElement], [VideoElement], or
15 * used. If the [ImageElement] is an animated image, then the poster frame is 11 * [CanvasElement].
16 * used. If there is no poster frame, then the first frame of animation is used.
17 * 12 *
18 * If the CanvasImageSource is a [VideoElement] then the frame at the current 13 * The image drawn to the canvas differs by implementation:
19 * playback position is used as the image.
20 * 14 *
21 * If the CanvasImageSource is a [CanvasElement] then the element's bitmap is 15 * * If this object is an [ImageElement], then this element's image is
22 * used. 16 * drawn to the canvas. If this element is an animated image, then this
17 * element's poster frame is drawn. If this element has no poster frame, then
18 * the first frame of animation is drawn.
23 * 19 *
24 * ** Note: ** Currently, all versions of Internet Explorer do not support 20 * * If this object is a [VideoElement], then the frame at this element's curren t
25 * drawing a VideoElement to a canvas. Also, you may experience problems drawing 21 * playback position is drawn to the canvas.
22 *
23 * * If this object is a [CanvasElement], then this element's bitmap is drawn to
24 * the canvas.
25 *
26 * **Note:** Currently all versions of Internet Explorer do not support
27 * drawing a video element to a canvas. You may also encounter problems drawing
26 * a video to a canvas in Firefox if the source of the video is a data URL. 28 * a video to a canvas in Firefox if the source of the video is a data URL.
27 * 29 *
28 * See also: 30 * ## See also
29 * 31 *
30 * * [CanvasImageSource](http://www.whatwg.org/specs/web-apps/current-work/mult ipage/the-canvas-element.html#image-sources-for-2d-rendering-contexts) 32 * * [CanvasRenderingContext2D.drawImage]
31 * from the WHATWG. 33 * * [CanvasRenderingContext2D.drawImageToRect]
32 * * [drawImage](http://www.whatwg.org/specs/web-apps/current-work/multipage/th e-canvas-element.html#dom-context-2d-drawimage) 34 * * [CanvasRenderingContext2D.drawImageScaled]
33 * from the WHATWG. 35 * * [CanvasRenderingContext2D.drawImageScaledFromSource]
36 *
37 * ## Other resources
38 *
39 * * [Image sources for 2D rendering contexts]
40 * (http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-eleme nt.html#image-sources-for-2d-rendering-contexts)
41 * from WHATWG.
42 * * [Drawing images]
43 * (http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-eleme nt.html#dom-context-2d-drawimage)
44 * from WHATWG.
34 */ 45 */
35 abstract class CanvasImageSource {} 46 abstract class CanvasImageSource {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698