Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/windmill/node_modules/evt/lib/types/lib.dom.d.ts>CanvasGradient

Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Go to Latest
interface CanvasGradient
import { type CanvasGradient } from "https://deno.land/x/windmill@v1.333.5/node_modules/evt/lib/types/lib.dom.d.ts";

An opaque object describing a gradient. It is returned by the methods CanvasRenderingContext2D.createLinearGradient() or CanvasRenderingContext2D.createRadialGradient().

Methods

addColorStop(offset: number, color: string): void

Adds a color stop with the given color to the gradient at the given offset. 0.0 is the offset at one end of the gradient, 1.0 is the offset at the other end.

Throws an "IndexSizeError" DOMException if the offset is out of range. Throws a "SyntaxError" DOMException if the color cannot be parsed.