Name
SetDrawTagsDefault -- set default values for standard draw tags (V5.0)
Synopsis
SetDrawTagsDefault(table)
Function
This command can be used to modify the default values of the standard draw tags. The standard draw tags are generic options that are supported by most of Hollywood's drawing commands. The standard draw tags are always passed inside an optional table that constitutes the last argument to a function. If a certain draw tag is not specified, Hollywood will fall back to an internal default setting. This default setting can be modified using SetDrawTagsDefault().

For example, let's assume that you always want to use an anchor point of 0.5/0.5 instead of 0.0/0.0 which is Hollywood's default anchor point. So instead of explicitly passing your desired anchor point to all draw commands that you call, you can simply define this anchor point as the new default anchor point that all drawing commands should use when no other point is given. See below for an example. You could also use SetDrawTagsDefault() to change the default insert position for layers from frontmost to backmost position etc.

The table you need to pass to this function can contain all tags that are listed in the documentation of the standard draw tags. For each tag that you specify, you have to provide a default value that Hollywood should use if no other value is given.

See Standard drawing tags for more information about the standard tags that nearly all Hollywood drawing commands support.

Inputs
table
a table containing one or more of the standard draw tags and a default value for each tag
Example
SetDrawTagsDefault({AnchorX = 0.5, AnchorY = 0.5})
DisplayBrush(1, 0, 0)
Box(100, 100, 200, 150, #RED)
The code above sets 0.5/0.5 as the default anchor point. The calls to DisplayBrush() and Box() will then use this anchor point because no other anchor point is given. In that case, the drawing commands fall back to the default anchor point which has been modified by the call to SetDrawTagsDefault().

Show TOC