blob: 69165cf58980cd5a5fff0447cf7475b5c10fc521 [file] [log] [blame]
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
part of html;
* An object that can be drawn to a [CanvasRenderingContext2D] object with
* [CanvasRenderingContext2D.drawImage],
* [CanvasRenderingContext2D.drawImageToRect],
* [CanvasRenderingContext2D.drawImageScaled], or
* [CanvasRenderingContext2D.drawImageScaledFromSource].
* If the CanvasImageSource is an [ImageElement] then the element's image is
* used. If the [ImageElement] is an animated image, then the poster frame is
* used. If there is no poster frame, then the first frame of animation is used.
* If the CanvasImageSource is a [VideoElement] then the frame at the current
* playback position is used as the image.
* If the CanvasImageSource is a [CanvasElement] then the element's bitmap is
* used.
* ** Note: ** Currently, all versions of Internet Explorer do not support
* drawing a VideoElement to a canvas. Also, you may experience problems drawing
* a video to a canvas in Firefox if the source of the video is a data URL.
* See also:
* * [CanvasImageSource](
* from the WHATWG.
* * [drawImage](
* from the WHATWG.
abstract class CanvasImageSource {}