25.1 Overview

A display is an area on the screen your script can draw to. Typically, a display is a window on your desktop screen but it can also be in full-screen mode and fill up the entire monitor space. In Hollywood, a display is always tied to a background picture (BGPic). The background picture is what will be initially shown to the user when your display becomes visible.

The background picture attached to a display 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.

Displays can also have transparent areas. Hollywood supports displays with alpha transparency (256 levels of transparency) and monochrome transparency.

Here is a minimal script which creates a 1024x768 display filled with the color red:

 
@DISPLAY {Width = 1024, Height = 768, Color = #RED}
WaitLeftMouse
End

Displays can also automatically scale their content using one of Hollywood's inbuilt scaling engines: Auto scaling or layer scaling. When enabling one of those scaling engines, the script will think it is running in its original resolution although the display is promoting it to an entirely different resolution using the selected scaling engine. See Scaling engines for details.

Hollywood displays can also run in palette mode. Displays will switch to palette mode whenever a BGPic that uses a palette is displayed. Palette mode displays behave quite differently than normal true color displays so there are some important things to consider when using displays in palette mode. See Palette mode displays for details.

Hollywood's display library also supports multiple monitors. You can specify the monitor a display should be opened on. See Multi-monitor support for details.


Show TOC