Starting with Hollywood 4.0, most of the drawing functions accept an optional table argument now, which lets you configure further options. For example, you can specify tags which will automatically scale or rotate the graphics before displaying it.
Many of the standard drawing tags only work when layers are enabled. Some, however, can also be used when layers are off. Note that the graphics data of the source object will never be changed. If layers are on Hollywood will insert the new layer and immediately apply any transformation before the layer is made visible. If layers are off a copy of the original graphics will be made. The original graphics data will never be changed (in contrast to functions like ScaleBrush(), RotateBrush(), TransformBrush() etc. which modify the brushes data). Thus, you can be sure that you will always get the best quality when using the standard draw tags to apply transformations, because Hollywood will always use the original graphics data.
For every standard draw tag there is a default value that is used when the tag is not specified. You can modify this default setting using the new SetDrawTagsDefault() command which allows you to define new default values for each tag. This is very useful if you would like to permanently use a different default value for a certain tag; for example, if you permanently want to use an anchor point of 0.5/0.5 instead of 0.0/0.0, or if you want to change the default layer insert position from frontmost to backmost etc.
The following standard tags are currently defined:
Width, Height:
Rotate:
SmoothScale:
True
, scaling and/or rotation will be
done using anti-aliased interpolation. This looks better but
is a lot slower. (V4.0)
ScaleX, ScaleY:
ScaleX
and ScaleY
, the
proportions of the graphics will remain intact. Please note
that ScaleX/Y
and Width/Height
are mutually exclusive. You
must not mix both groups. Either use ScaleX/Y
, or stick to
Width/Height
. (V4.5)
Transform:
Transform
.
The table must contain the four constituents of a 2x2
transformation matrix in the following order: sx, rx, ry,
sy. See TransformBrush for more information about transformation matrices.
Please note that the Transform
tag is mutually exclusive
with the following tags: Width/Height/ScaleX/ScaleY/Rotate.
You must not combine it with any of these tags. (V4.5)
AnchorX, AnchorY:
DisplayBrush(1, 0, 0, {AnchorX = 0.5, AnchorY = 0.5}) |
This call will make the brush's center appear at 0:0 because
the anchor point is set to 0.5/0.5. If you want the brush's
top left corner to appear at 0:0, you will have to use an
anchor point of 0.0/0.0 (which is also the default anchor
point, so you do not have to specify it at all). Anchor
points are most of the time only used when layers are enabled.
However, you can also use AnchorX/Y
if layers are off.
See SetLayerAnchor for some more information about the anchor point concept. (V4.5)
Hidden:
True
, the graphics will be inserted as a layer
but nothing will be shown because the layer is kept hidden.
This function is only available with enabled layers. Defaults
to False
. (V4.5)
InsertPos:
Name:
Name
tag here just saves you some typing and
makes the code more readable. This tag is only handled when
layers are enabled. By default, no names are given to new
layers. By default, they can only be referred to using IDs. (V4.5)
Group:
Group
tag here just
saves you some typing and makes the code more readable. This tag is
only handled when layers are enabled.
See GroupLayer for details. (V10.0)
Transparency:
GlobalTransparency:
True
,
the layer's transparency setting set using the Transparency
tag or
using functions like SetLayerTransparency()
will also be applied to the layer's shadow. For some reason Hollywood never did
that by default and in order to maintain compatibility with scripts which
expect the old behaviour the functionality has been added using a new tag.
If you want to globally enable the new behaviour for all your layers, just
call SetDrawTagsDefault() with GlobalTransparency
set to True
. (V9.1)
Tint:
TintColor
tag (see
below). Defaults to 0 which means no tinting. Starting with
Hollywood 5.0 this tag is directly mapped to the Tint
filter.
Thus, specifying the Tint
tag is the same as specifying a
Tint
filter in the Filters
table below. (V4.5)
TintColor:
Tint
. In that case, you
have to specify a RGB color color here that will be used for
tinting. (V4.5)
Shadow:
True
, the graphics object will be
drawn with a drop shadow. You can configure the look of the
shadow using the ShadowDir
, ShadowSize
, ShadowColor
,
and ShadowRadius
tags. See below for more information.
This tag is only supported when layers are turned on.
See SetLayerShadow for details. (V5.0)
ShadowDir:
Shadow
is set to True
(see above). (V5.0)
ShadowColor:
Shadow
is set to True
(see above). (V5.0)
ShadowPen:
#PALETTEMODE_PEN
and the drawing
target uses a palette, the shadow will be drawn using the
pen specified here instead of the color specified in the ShadowColor
tag from above. (V9.0)
ShadowSize:
Shadow
is set to True
(see above). (V5.0)
ShadowRadius:
Shadow
is set to True
(see above). (V5.0)
Border:
BorderSize
and BorderColor
tags. Please see below for more
information. This tag is only supported when layers are turned
on. See SetLayerBorder for details. (V5.0)
BorderColor:
Border
is set to True
(see above). (V5.0)
BorderPen:
#PALETTEMODE_PEN
and the drawing
target uses a palette, the border will be drawn using the
pen specified here instead of the color specified in the BorderColor
tag from above. (V9.0)
BorderSize:
Border
is set to True
(see above). (V5.0)
Filters:
Filters
tag actually also works
when layers are disabled. (V5.0)