DR Draw line

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 line (area; startH; startV; endH; endV; mode) Longint

ParameterTypeDescription
areaLongint4D Draw area
startHNumberHorizontal position of start
startVNumberVertical position of start
endHNumberHorizontal position of end
endVNumberVertical position of end
modeInteger0=Absolute
1=Relative
Function resultLongintObject ID

Description

The command DR Draw line creates a new line in area and returns the object's ID.

The new line is created with the default line attributes and positioned according to startH, startV, endH, and endV. All four coordinates are expressed in base units. Use the DR Scale to base function to convert from scale units to base units.

startH and startV are specified as offsets from the current origin.

endH and endV can be specified as offsets from the current origin (absolute) or offsets from startH and startV (relative).

If mode equals 0, endH and endV are absolute coordinates. If mode equals 1, endH and endV are relative coordinates. Positive values indicate a direction down or right. Negative values indicate a direction up or left.

Examples

(1) The following example uses DR Draw line with absolute coordinates. It sets the origin to the upper left corner of the document and then draws a line that starts one in/one down and ends two in/two down.

   DR SET ORIGIN (Area;0;0;0)
   $ID := DR Draw line (Area;1;1;2;2;0)

(2) The following example uses DR Draw line with relative coordinates. It draws a line that starts at the current origin and ends three base units to the right.

   $ID := DR Draw line (Area;0;0;3;0;1)

See Also

DR SET ENDMARKS, DR SET LINE ATTRIBUTES.


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