The inbuilt constants are used by many functions as descriptors for a
special action. Therefore, their function is different from constant to
constant. If a function requires a special constant as an argument
(e.g. SetFontStyle() accepts the constants #BOLD
, #ITALIC
, #NORMAL
and
#UNDERLINED
), then those constants are described in the documentation for
that command.
Additionally there are some constants that can be specified everytime a Hollywood function asks you for a x or y coordinate. These constants are the so-called "position constants". They allow you to easily specify some often used positions. The following position constants are inbuilt in Hollywood:
The following constants can be used as a x-coordinate:
#CENTER:
#LEFT:
#LEFTOUT:
#RIGHT:
#RIGHTOUT:
#USELAYERPOSITION:
The following constants can be used as a y-coordinate:
#CENTER:
#TOP:
#TOPOUT:
#BOTTOM:
#BOTTOMOUT:
#USELAYERPOSITION:
These constants make it very easy for you to position your objects. For
example if you want to display brush 1 in the center of the display, just
call DisplayBrush() with the arguments 1, #CENTER
,
#CENTER
et voila!
You can even fine-tune the positions by subtracting and adding values to
these constants! For example, DisplayBrush(1, #CENTER, #CENTER + 25)
displays
brush one 25 pixels below the vertical center of the display.
There are also some constants that allow you to easy access some basic
colors. The following color constants are currently declared by default:
#BLACK
, #MAROON
, #GREEN
, #OLIVE
, #NAVY
, #PURPLE
, #TEAL
, #GRAY
, #SILVER
,
#RED
, #LIME
, #YELLOW
, #BLUE
, #FUCHSIA
, #AQUA
, #WHITE
.
Finally, Hollywood defines some platform-specific constants depending on the platform it is currently running on or compiling for. You can use the @IF preprocessor command to test for those constants and take desired action. You can find these platform-specific constants in the section on the @IF preprocessor command in this documentation. See IF for details.