Line(x1, y1, x2, y2[[, color], table])
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:
Arrowhead:
#ARROWHEAD_NONE:
#ARROWHEAD_SINGLE:
#ARROWHEAD_DOUBLE:
Defaults to #ARROWHEAD_NONE
. (V9.1)
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.
Note that when drawing to a palette-based target and the palette mode is set
to #PALETTEMODE_PEN
, this function will draw using the pen set via SetDrawPen()
instead of the color passed to the function.
#BLACK
)
color is optional because it is not required when you
render to a mask or alpha channelLine(0, 0, 639, 479, #WHITE) Line(639, 0, 0, 479, #WHITE)The above code draws a white cross on the display.