19.1 Overview

Background pictures (BGPics) are very important in Hollywood because every display needs to have a background picture that is attached to it. The background picture is what will be initially shown to the user when your display becomes visible. The background picture will then act as the "work area" of your script, i.e. the area that you can use for drawing any graphics you like. This area is fully yours and you can use it like you want.

The background picture must always be of the same size as the display. Thus, if you change the display size, e.g. by using ChangeDisplaySize() your background picture will automatically be scaled to fit the new dimensions because as already said before the display size is always the same as the current background picture size. If your window is resizeable, then the user may also adjust your display size. If he does, Hollywood will internally call ChangeDisplaySize() to adjust to the new dimensions.

If you choose to display a new background picture, e.g. by using the DisplayBGPic() command, and the dimensions of the new background picture differ from the dimensions of your current background picture, then your display will also be resized to fit the new dimensions.

At startup, Hollywood will display the background picture that has been assigned the identifier 1. If you haven't declared a background picture that uses the identifier 1 using the @BGPIC preprocessor command, Hollywood will create this background picture automatically for you and attach it to your display. The background picture will use the fill style and dimensions specified in the @DISPLAY preprocessor command for display 1 in your script.

Here is a minimal script which creates a display that shows the image file test.jpg:

@BGPIC 1, "test.jpg"

Show TOC