For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Interface CanvasGradient

The CanvasGradient interface represents an opaque object describing a gradient.

MDN Reference

interface CanvasGradient {
    addColorStop(offset: number, color: string): void;
}
Index

Methods

Methods

  • The CanvasGradient.addColorStop() method adds a new color stop, defined by an offset and a color, to a given canvas gradient.

    MDN Reference

    Parameters

    • offset: number
    • color: string

    Returns void

Was this helpful?