DR GET ARC SPECS

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 GET ARC SPECS (area; scope; start; length; radiusH; radiusV; centerH; centerV)

ParameterTypeDescription
areaLongint4D Draw area
scopeLongint-1=All
0=Selected
>0=Object ID
startIntegerStarting point angle in degrees
lengthIntegerArc length in degree
radiusHNumberHorizontal radius
radiusVNumberVertical radius
centerHNumberHorizontal location of arc center
centerVNumberHorizontal location of arc center

Description

The command DR GET ARC SPECS returns into the start, length, radiusH, radiusV, centerH, and centerV variables various specifications about the arc in area described by scope.

If scope equals -1, the command returns specifications for the first arc in the document.

If scope equals 0, the command returns the specifications for the first selected arc.

If scope is greater than 0, it must be equal to a specific arc's object ID and the command returns that arc's specifications. If the object does not exist, DR GET ARC SPECS returns -32000 for each attribute, and DR Error returns error number 2. If the object described by scope is not an arc, the command returns -32000 for each attribute, and DR Error returns error number 47.

start is the beginning point of the arc in degrees. The arc is measured moving in a counter-clockwise fashion.

length is the length of the arc in degrees. The end of an arc is always start + length

%
(modulo) 360. Arcs have a maximum length of 359°.

radiusH and radiusV are the horizontal and vertical radii of the arc expressed in base units. These two numbers can be different, because an arc is a portion of an oval rather than a circle. 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; they are expressed in base units. Use the DR Base to scale function to convert from base units to scale units. See the diagram for the DR Draw arc function.

The following diagram indicates the relevant attributes of an arc:

Example

The following example uses DR GET ARC SPECS to display an alert that displays the beginning and ending of the selected arc.

   DR GET ARC SPECS (Area;0;vStart;vLength;vRadiusH;vRadiusV;vCenterH;vCenterV)
   If (0 = DR Error)
      ALERT("Arc starting point: "+String (vStart)+Char(13)+"Arc ending point: "+String(vStart+vLength))
   Else
      ALERT ("Select a single arc first")
   End if

See Also

DR Draw arc, 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