fillStyle, foreground
,
background
,
fillStart
,
fillEnd
,
fillAngle
, and
fillTexture
.
fillStyle
property specifies the type of paint object used to fill the shape.
The possible values are listed in the following table.
CSS
Property and Values |
Rendering
|
---|---|
fillStyle = SOLID_COLOR
|
|
fillStyle = LINEAR_GRADIENT
|
|
fillStyle = RADIAL_GRADIENT
|
|
fillStyle = TEXTURE
|
foreground
and
background
properties specify the colors used:
SOLID_COLOR
mode, the shape is filled with
foreground
.
LINEAR_GRADIENT
and
RADIAL_GRADIENT
modes, the gradient starts with
foreground
and ends with
background
:
CSS
Properties and Values |
Rendering
|
---|---|
fillStyle = LINEAR_GRADIENT
foreground = blue
background = red
|
|
fillStyle = RADIAL_GRADIENT
foreground = blue
background = red
|
LINEAR_GRADIENT
and
RADIAL_GRADIENT
modes, the
fillStart
,
fillEnd
, and
fillAngle
properties define the geometry of the gradient. A gradient is
defined by two points, P1 and P2. The following figures show the
results of the properties.
foreground
to
background
outside the (P1, P2) segment.
fillTexture
property specifies an image that will be used as a texture in
TEXTURE
mode.