CanvasGradient extension type
The CanvasGradient
interface represents an
opaque object describing a
gradient. It is returned by the methods
CanvasRenderingContext2D.createLinearGradient,
CanvasRenderingContext2D.createConicGradient or
CanvasRenderingContext2D.createRadialGradient.
It can be used as a CanvasRenderingContext2D.fillStyle or CanvasRenderingContext2D.strokeStyle.
API documentation sourced from MDN Web Docs.
- on
- Implemented types
- Available extensions
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addColorStop(
num offset, String color) → void -
The
CanvasGradient.addColorStop()
method adds a new color stop, defined by anoffset
and acolor
, to a given canvas gradient. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited