CanvasImageSource class

An object that can be drawn to a 2D canvas rendering context.

The image drawn to the canvas depends on the type of this object:

  • If this object is an ImageElement, then this element's image is drawn to the canvas. If this element is an animated image, then this element's poster frame is drawn. If this element has no poster frame, then the first frame of animation is drawn.

  • If this object is a VideoElement, then the frame at this element's current playback position is drawn to the canvas.

  • If this object is a CanvasElement, then this element's bitmap is drawn to the canvas.

Note: Currently all versions of Internet Explorer do not support drawing a video element to a canvas. You may also encounter problems drawing a video to a canvas in Firefox if the source of the video is a data URL.

See also

Other resources

Implementers

Constructors

CanvasImageSource()

Properties

hashCodeint
read-only, inherited
The hash code for this object. [...]
runtimeTypeType
read-only, inherited
A representation of the runtime type of the object.

Methods

noSuchMethod(Invocation invocation) → dynamic
inherited
Invoked when a non-existent method or property is accessed. [...]
toString() → String
inherited
A string representation of this object. [...]

Operators

operator ==(Object other) → bool
inherited
The equality operator. [...]

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-html/CanvasImageSource-class.html