Draw Circle/Circular Arc/Circular Wedge


Purpose

The Draw Circle/Circular Arc/Circular Wedge function draws either the outline of a circle (or a partial circle) or the interior of a circle (or partial circle) based on the "Fill Mode" attribute.

Syntax

Opcode format Opcode [ASCII] (Hex) Operand Format Comments
Single-byte, readable operand [R] (52) [<ws>]<IX>,<IY>,<IR><ws><IStart>,<IEnd> Absolute coordinates.
Single-byte, binary operand [r] (72) <LX><LY><ULR> Full circle, relative coordinates.
[Ctrl-R] (12) <SX><SY><USR> Full circle, relative coordinates.
(92) <LX><LY><ULR><USstart><USEnd> A partial or full circle, relative coordinates.

 

X,Y Center point (in logical coordinates) of the circle to be drawn

R Radius (in logical coordinates) of the circle to be drawn

Start, End The angles (in 360/65,536ths of a degree) that describe a "pie-slice" of the full circle to be rendered; legal values range from 0 to 65,536

Details

When the "Fill Mode" attribute is inactive (the default), the Draw Circle function renders the outline of a circle based on the current line drawing attributes, which include "Color", "Visibility", "Line Weight", "Line Cap", and "Line Pattern."

When the "Fill Mode" attribute is active, the Draw Circle function renders the interior of a circle in a solid color based on the Polygon drawing attributes, which include "Color", and "Visibility."

Some of the circle opcodes take Start and End arguments, which allow a portion of the specified circle to be rendered. This is shown in figure 1. With "Fill Mode" off, Start and End define a circular arc, and with "Fill Mode" on, a circular wedge is rendered. The Start and End values are integers that represent 360/65,536ths of a degree.

 

Figure 1. Portion of circle rendered by Start and End arguments

Notes

When start and end angles are specified, there are two possible regions of the circle that can be considered: DWF only considers the region defined by going from start to end in a counter-clockwise direction.

When "Fill Mode" is active, a visually apparent outlining edge of the circle is not rendered. The filled Draw Circle function may be followed by an additional unfilled Draw Circle call to render the desired edge. For an example and further information, see the "Notes" section of the Draw Polyline/Polygon function.

 

Implementation in WHIP! Versions

Toolkit Function

TBD

Partial

Full

Revised in

Draw Circle/Circular Arc/Circular Wedge - -

2.0

-

 

See Also

Draw Polyline/Polygon, Set Color, Set Line Weight, Set Line Pattern, Set Fill Mode and Set Visibility