Skip to main content
Module

x/canvas/types.ts>SkAnimatedImage

Canvas API for Deno, ported from canvaskit-wasm (Skia).
Go to Latest
interface SkAnimatedImage
import { type SkAnimatedImage } from "https://deno.land/x/canvas@v1.0.0/types.ts";

See SkAnimatedImage.h for more information on this class.

Methods

decodeNextFrame(): number

Decodes the next frame. Returns -1 when the animation is on the last frame.

getFrameCount(): number

Return the total number of frames in the animation.

getRepetitionCount(): number

Return the repetition count for this animation.

height(): number

Returns the possibly scaled height of the image.

makeImageAtCurrentFrame(): SkImage | null

Returns a still image of the current frame or null if there is no current frame.

reset(): void

Reset the animation to the beginning.

width(): number

Returns the possibly scaled width of the image.