Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
interface SkAnimatedImage
import { type SkAnimatedImage } from "https://deno.land/x/canvaseno@v1.0.2/mod.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.