Name
Line -- draw a line
Synopsis
Line(x1, y1, x2, y2[, color, table])
Function
This function draws a line from the point defined by x1 and y1 to the point defined by x2 and y2 in the specified color (RGB value).

If you want to have anti-aliased lines, use the SetFormStyle() command to enable anti-aliased drawing.

If layers are enabled, this command will add a new layer of the type #LINE to the layer stack.

New in Hollywood 2.0: Color can also be an ARGB value for alpha-blended drawing.

Starting with Hollywood 4.5 this function uses a new syntax with just a single table as an optional argument. The old syntax is still supported for compatibility reasons. The optional table argument can be used to configure the style of the line. The following options are possible:

Thickness:
This tag allows you to specify the thickness of the line you want to draw. The minimum acceptable value here is 1 which will draw a normal line. This is also the default if you do not specify this tag. (V2.5)

Furthermore, the optional table argument can also contain one or more of the standard tags for all drawing commands. See Standard drawing tags for more information about the standard tags that nearly all Hollywood drawing commands support.

Inputs
x1
source x offset
y1
source y offset
x2
destination x offset
y2
destination y offset
color
optional: RGB or ARGB color (defaults to #BLACK) color is optional because it is not required when you render to a mask or alpha channel
table
optional: table containing further arguments; can be any from the ones listed above and from the standard tags (V4.5)
Example
Line(0, 0, 639, 479, #WHITE)
Line(639, 0, 0, 479, #WHITE)
The above code draws a white cross on the display.

Show TOC