Name
SetFormStyle -- set the form style for graphics primitives (V2.5)
Synopsis
SetFormStyle(style[, t])
Deprecated syntax
SetFormStyle(#SHADOW, color, distance, direction)
SetFormStyle(#BORDER, color, size)
Function
This function can be used to configure the drawing style for the commands of the graphics primitives library. This function affects the look of the Arc(), Box(), Circle(), Ellipse(), Line(), and Polygon() commands.

The style must be one of the following predefined constants:

#NORMAL
This resets the form style to the default style.

#ANTIALIAS
This sets the form style to anti-alias; the graphics primitives will be drawn with anti-aliasing.

#SHADOW
This sets the form style to shadow. The forms will be drawn with a shadow with this style. The color argument specifies the shadow color. This color can be either in RGB or ARGB notation. Shadow transparency is fully supported. The distance argument specifies the distance of the shadow from the main form in pixels. The direction argument specifies the direction of the shadow. This must be one of the directional constants. Please note that #SHADOW is not supported for the fill style #FILLNONE if layers are disabled.

#BORDER
This sets the form style to bordered. A border of the specified size will be drawn around the form with this style. The color argument specifies the color for the border. This color can either be in RGB or ARGB notation. Border transparency is fully supported. The size argument specifies the desired thickness of the border in pixels. Please note that #BORDER is not supported for the fill style #FILLNONE if layers are disabled. Before Hollywood 9.0, this style was called #EDGE.

To combine multiple form styles in a single call simply bit-or them with another, e.g. a call to SetFormStyle(#SHADOW|#BORDER) will enable the shadow and border form styles. Obviously, the style #NORMAL is mutually exclusive and cannot be combined with any other style.

Starting with Hollywood 9.0, SetFormStyle() uses a new syntax that accepts an optional table argument that supports the following tags:

ShadowDir:
Specifies the direction of the shadow. This must be set to one of Hollywood's directional constants. This tag is only handled when the #SHADOW style has been set (see above). (V9.0)

ShadowColor:
Specifies the color of the shadow. This must be an ARGB value that can contain a transparency setting. This tag is only handled when the #SHADOW style has been set (see above). (V9.0)

ShadowSize:
Specifies the length of the shadow. This tag is only handled when the #SHADOW style has been set (see above). (V9.0)

BorderColor:
Specifies the color of the border. This must be an ARGB value that can contain a transparency setting. This tag is only handled when the #BORDER style has been set (see above). (V9.0)

BorderSize:
Specifies the size of the border. This tag is only handled when the #BORDER style has been set (see above). (V9.0)

Please note that the Line() command does not support the form styles #SHADOW and #BORDER. It only recognizes the style #ANTIALIAS.

Inputs
style
special style constant (see list above)
t
optional: table argument containing further options (see above) (V9.0)
Example
SetFormStyle(#ANTIALIAS)
The function call above enables anti-aliased forms.


SetFormStyle(#SHADOW, {ShadowColor = ARGB(128, $939393),
     ShadowSize = 16, ShadowDir = #SHDWSOUTHEAST})
The above code enables a half-transparent grey shadow which will be positioned 16 pixels to the south-east of the main form.

Show TOC