@BGPIC id, filename$[, table]
filename$
and assigns the identifier id
to it. If you specify 1
as the identifier, then this picture will be used as the initial
background picture when Hollywood opens your display.
Image formats that are supported on all platforms are PNG, JPEG, BMP,
IFF ILBM, GIF, and image formats you have a plugin for. Depending on the
platform Hollywood is running on, more image formats might be supported.
For example, on Amiga compatible systems Hollywood will be able to open all
image formats you have datatypes for as well. On Windows, @BGPIC
can also
load image formats supported by the Windows Imaging Component.
Starting with Hollywood 5.0, this function can also load vector formats like SVG if you have an appropriate plugin installed. Using a vector image as a BGPic has the advantage that when the size of the display changes (e.g. because the user is resizing the window), the BGPic can be adapted to the new size without any losses in quality because vector BGPics can be infinitely scaled without any sacrifices in quality. See Vector BGPics for more information on vector BGPics.
The third argument is optional. It is a table that can be used to set further options for the loading operation. The following fields of the table can be used:
Transparency:
LoadAlpha:
True
if the alpha channel of the
image shall be loaded, too. Please note that not all
pictures have an alpha channel and that not all
picture formats are capable of storing alpha channel
information. It is suggested that you use the PNG
format if you need alpha channel data. This tag
defaults to False
. (V4.5)
Link:
False
if you do not want to have
this BGPic linked to your executable/applet when you
compile your script. This field defaults to True
which means that the BGPic is linked to your executable/applet
when Hollywood is in compile mode.
FillStyle:
FillColor:
TextureBrush:
TextureX, TextureY:
GradientStyle:
GradientAngle:
GradientStartColor, GradientEndColor:
GradientCenterX, GradientCenterY:
GradientBalance:
GradientBorder:
GradientColors:
ScaleWidth, ScaleHeight:
SmoothScale:
Loader:
Adapter:
LoadTransparency:
LoadPalette:
FillPen:
TransparentPen:
UserTags:
If you use Transparency
, LoadTransparency
or LoadAlpha
, your display will automatically
adopt the transparency settings of the BGPic when it is displayed. In
other words, if you want to have a display with transparency, simply load
a transparent BGPic and display it.
If you set the LoadPalette
tag to True
, your display will become a palette
display as soon as the BGPic is shown. Palette displays behave differently than
normal true colour displays and there are some things to be considered when
using them. See Palette displays for details.
Please note that the Transparency
, LoadTransparency
and LoadAlpha
tags are mutually
exclusive. A BGPic can only have one transparency setting!
If you want to load background pictures manually, please use the LoadBGPic() command.
@BGPIC 1, "MyBG.png"Declare "MyBG.png" as the initial background picture (will be displayed when Hollywood starts up).
@BGPIC 1, "MyBG.png", {Transparency = $FF0000}Does the same like above but the picture is now transparent (transparency color is red=$FF0000).
@BGPIC 1, "4MB_uncompressed_picture.bmp", {Link = False}The code above loads the specified picture and tells Hollywood that it should never link this image because it is so big.