[id] = CreateGradientBrush(id, width, height, type, startcolor, endcolor[, angle, table])
id
argument, this
function will choose an identifier for this brush automatically
and return it to you. The width
and height
arguments specify the desired dimensions
for the new brush. The type
argument specifies the type of the gradient you want to
use. The following gradient types are currently available: #LINEAR
,
#RADIAL
, and #CONICAL
. The angle
argument allows you to specify a rotation angle (in
degrees) for the gradient. The angle argument is only supported by
gradients of type #LINEAR
and #CONICAL
. Radial gradients cannot be
rotated.
The optional table argument can be used to specify advanced options. The following tags are currently recognized:
CenterX, CenterY:
#RADIAL
or #CONICAL
. The center
point must be specified as a floating point value that
is between 0.0 (left/top corner) and 1.0 (right/bottom
corner). If not specified, both tags default to 0.5
which means that the center point of the gradient is
in the center of the image.
Border:
#RADIAL
. For the other gradient
types this tag is ignored. The border size of the
radial gradient must be a floating point value between
0.0 and 1.0. Defaults to 0.0 which means no border.
Balance:
#CONICAL
. For the other gradient
types this tag is ignored. The balance point of the
conical gradient must be floating point value between
0.0 and 1.0. Defaults to 0.5. Note that this is only
used when creating a two-color gradient. When creating
a multi-color gradient using the Colors
table, Balance
is ignored because the Colors
table allows you to
individually balance the colors in the gradient using
color stops.
Colors:
startcolor
and
endcolor
arguments are ignored, and Hollywood will
only use the colors specified in this tag.