🔰gradients
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
browser ⟩ canvas ⟩ graphics state ⟩ fill/stroke styles ⟩ gradient
after creating object, define
number:0 ~ 1
color:colors
The arguments to .createRadialGradient(): centers & radii of two circles:
need not be concentric.
first circle typically lies entirely inside the second.
areas inside smaller circle or outside the larger are filled with solid colors.
Gradient coordinates are relative to the drawing (2D) context, NOT relative to a shape's local coordinates.
CanvasGradient ⟩ .addColorStop() - define gradient colors
colors - define gradient colors.