Arc(x, y, xradius, yradius, start, end[[, color], table])
x
and y
using the specified radii and color (RGB value) in the style configured
using the SetFormStyle() and SetFillStyle() commands. The arguments
start
and end
specify the start and end angles of the ellipse and must
be specified in degrees. If you want to draw a closed ellipse, the start
argument needs to be 0 and the end
argument needs to be 360. Using the
Ellipse() command is of course easier in this case.
The width of the partial ellipse will be xradius
* 2 + 1 (center point)
and the height will be yradius
* 2 + 1 (center point).
If layers are enabled, this command will add a new layer of the type
#ARC
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 arc. The following options are possible:
Clockwise:
True
which means clockwise drawing. If you set it to False
,
Arc()
will connect the angles in anti-clockwise direction. (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.
Please note that due to historical reasons the position that has to be passed to this function in the first two arguments is really the top-left corner of the elliptical arc's bounding rectangle. This might be confusing since traditionally elliptical arcs are drawn relative to their center point. Due to a design mistake in Hollywood 1.0, however, Hollywood unfortunately deviates from this standard.
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 channelArc(0, 0, 183, 183, 45, 315, #WHITE) Circle(164, 33, 16, #BLACK)Draws a pac-man shape.