Call Box Commands
Version 2.0 15 Jan-90


CALL AR the ARC commands

There are 5 commands that draw arcs. The arcs are drawn with the pen in the current port.

Note: Any command that draws something, draws to a graphics port. You must make sure that the port you want to draw in is the current port before drawing to it. Because you are drawing to a port and not necessarily the screen, the coordinates used to draw are in a coordinate system unique to the port you have selected. This coordinate system is Called LOCAL. GLOBAL coordinates on the other hand refer to the screen coordinates... or the current cursor position. If you choose to draw to the screen then the LOCAL coordinates will equal the GLOBAL coordinates.

COMMAND FUNCTION DESCRIPTION
CALL AR,O,X,Y,W,H,SA,AA FRAME ARC: draws an arc outline in the current pen color.
CALL AR,1,X,Y,W,H,SA,AA PAINT ARC: draws an arc and fills it with the current pen color.
CALL AR,2,X,Y,W,H,SA,AA ERASE ARC: draws an arc and fills it with color 0.
CALL AR,3,X,Y,W,H,SA,AA INVERT ARC: draws an arc and inverts the pixels colors.
CALL AR,4,X,Y,W,H,SA,AA,P FILL ARC: draws an arc and fills it with the current pen pattern.

X
Left edge of the enclosing rectangle for the arc in LOCAL coordinates.

Y
Top edge of the enclosing rectangle for the arc in LOCAL coordinates.

W
Width of the enclosing rectangle for the arc in pixels.

H
Height of the enclosing rectangle for the arc in pixels.

SA
Starting angle in degrees

AA
Ending angle in degrees

P
Pattern used to fill arc (0-15)


Figure 2.1
Figure 2.1 Arc construction

Arcs are constructed inside of an imaginary rectangle (enclosing rectangle) specified by X,Y,W and H. The starting angle (SA) and the ending angle (AA) are specified in degrees (0 to 360). 0 degrees is at the 12 o-clock position and the angle mcreases clockwise around the center of the enclosing rectangle, refer to Figure 3.1. Arcs made in 320 mode will follow a circular path if the width and height are the same, however arcs created in 640 mode will have to have the width twice the height for the same effect.

Paint, Erase, Invert, and Fill will create filled arcs as shown by the (pie wedged) example in Figure 3.1. Frame will produce just the curved portion of the arc.

Specifying 0 for the starting angle and 360 for the ending angle will produce an Oval or Circle depending on the shape of the enclosing rectangle.