Name
CreateBGPic -- create a blank background picture (V1.5)
Synopsis
[id] = CreateBGPic(id, width, height[[, color], table])
Function
This function creates a new background picture with the specified width and height and initializes it to the specified color. If no color is specified, the background picture is initialized to black. If you specify Nil in the id argument, CreateBGPic() will choose an identifier for this background picture automatically and return it to you.

Starting with Hollywood 9.0, there is an optional table argument that allows you to specify further options. The following table tags are currently supported:

Palette:
If this tag is set to the identifier of a palette, Hollywood will create a palette background picture for you. Palettes can be created using functions like CreatePalette() or LoadPalette(). Alternatively, you can also set this tag to one of Hollywood's inbuilt palettes, e.g. #PALETTE_AGA. See SetStandardPalette for a list of inbuilt palettes.

FillPen:
If the Palette tag is set (see above), you can use this tag to set the pen that should be used for filling the background picture's background. Note that the color parameter that is passed to CreateBGPic() is ignored if Palette is True. That's why this tag is here to allow you to specify a pen that will be used when initializing the background picture's pixels. Defaults to 0.

TransparentPen:
If Palette is set to True, this tag can be used to specify a pen that should be made transparent in the new background picture. Defaults to #NOPEN which means that there should be no transparent pen.

Inputs
id
id for the new background picture
width
width for the background picture
height
height for the background picture
color
optional: RGB color for background (defaults to #BLACK)
table
optional: table containing further options (see above) (V9.0)
Results
id
optional: identifier of the BGPic; will only be returned when you pass Nil as argument 1 (see above)
Example
CreateBGPic(2, 640, 480)
The above code creates a new black BGPic with the id 2 and the dimension of 640x480.

Show TOC