[id] = CreateGradientBGPic(id, type, startcolor, endcolor[, width, height, angle, table])
id
argument, this function
will choose an identifier for this background picture automatically
and return it to you. type
specifies the type of the gradient you want to
use. The following gradient types are currently available: #LINEAR
,
#RADIAL
, and #CONICAL
. If width
and height
are omitted, the dimensions
will be set to the same as the current display's dimensions. The angle
parameter 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. (V5.0)
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. (V5.0)
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. (V5.0)
Colors:
startcolor
and
endcolor
arguments are ignored, and Hollywood will
only use the colors specified in this tag. (V5.0)
CreateGradientBGPic(2, #LINEAR, #BLACK, #BLUE) DisplayBGPic(2)Creates a top to bottom gradient as background picture 2 with a color fade from black to blue and displays it.
CreateGradientBGPic(2, #LINEAR, 0, 0, 640, 480, 0, {Colors = {#RED, 0, #BLUE, 0.25, #GREEN, 0.5, #YELLOW, 0.75, #BLACK, 1}}) DisplayBGPic(2)The code above creates a gradient containing multiple color stops. This gradient tries to replicate the look of the famous Amiga copper bars.