DR Draw arc

4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next

version 6.0


DR Draw arc (area; start; length; radiusH; radiusV; centerH; centerV) Longint

ParameterTypeDescription
areaLongint4D Draw area
startIntegerstarting angle in degrees
lengthIntegerLength of Arc in degrees
radiusHNumberHorizontal radius
radiusVNumberVertical radius
centerHNumberHorizontal location of arc center
centerVNumberVertical location of arc center
Function resultLongintObject ID

Description

The command DR Draw arc creates a new arc in area and returns the object's ID. The new arc is created with the default line and fill attributes.

start is the beginning of the arc in degrees. start is the point that begins the arc, moving counter-clockwise from 0°. start must be less than 360°.

length is the length of the arc in degrees. The end of an arc is start + length % 360. Arcs have a maximum length of 359°.

radiusH and radiusV are the horizontal and vertical radii of the arc expressed in base units. As the basis of an arc is an oval, not necessarily a circle, these two numbers can be different. If radiusH equals radiusV, the arc is a portion of a circle.

centerH and centerV are the horizontal and vertical coordinates of the center of the arc with respect to the origin and are expressed in base units. Use the DR Base to scale function to convert from base units to scale units.

The following diagram illustrates the parameters that describe an arc:

Example

The following example creates ninety 4° arcs. Each arc uses a different color but the same coordinates for the center. The effect is a circle filled with a rainbow gradient. This example requires a color monitor set to 8-bit depth.

   For ($i ;0;89)
      DR SET FILL ATTRIBUTES (Area;-2;3;DR Index to color ($i + 17))
      $ID := DR Draw arc (Area;$i * 4;4;2;2;2;2)
   End for

See Also

DR GET ARC SPECS, DR SET ARC SPECS.


4D - Documentation   Français   English   German   4D Draw 2004, Command Theme List   4D Draw 2004, Command Alphabetical List   Back   Previous   Next