Name
Arc -- draw a partial ellipse (V2.0)
Synopsis
Arc(x, y, xradius, yradius, start, end[, color, table])
Function
This function draws a partial ellipse at the position specified by 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:
You can use this tag to specify whether or not the elliptic arc shall be drawn in clockwise direction. This tag defaults to 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.

Inputs
x
x offset for the ellipse
y
y offset for the ellipse
xradius
x radius of your ellipse
yradius
y radius of your ellipse
start
start angle in degrees (must be positive)
end
end angle in degrees (must be positive)
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
Arc(0, 0, 183, 183, 45, 315, #WHITE)
Circle(164, 33, 16, #BLACK)
Draws a pac-man shape.

Show TOC