DR POLYGON 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 POLYGON LINE (area; vertexH; vertexV; mode)

ParameterTypeDescription
areaLongint4D Draw area
vertexHNumberHorizontal position
vertexVNumberVertical position
modeInteger0=Absolute
1=Relative

Description

The command DR POLYGON LINE adds a vertex to the polygon that is currently being built for area.

vertexH and vertexV can be specified as offsets from the current origin (absolute) or offsets from the previous vertex (relative).

If mode equals 0, vertexH and vertexV are absolute coordinates.

If mode equals 1, vertexH and vertexV are relative coordinates.

The first vertex in a polygon is always absolute. Positive values indicate a direction down or right. Negative values indicate a direction up or left.

Both vertexH and vertexV are expressed in base units. Use the function DR Scale to base to convert from scale units to base units.

To make a closed polygon, the last vertex must match the first. A polygon requires at least three vertices.

To add a new vertex, the drawing process must already have been started by a call to DR START POLYGON. If you added several vertices to a polygon and then make another call to DR START POLYGON, the vertices are erased and the polygon is started again. Each call to DR POLYGON LINE is equivalent to a user mouse-click when a new polygon is being drawn.

Example

The following example creates a diamond-shaped polygon using relative references.

   DR START POLYGON (Area)
   DR POLYGON LINE (Area;1.5;1;0)
   DR POLYGON LINE (Area;0.5;0.5;1)
   DR POLYGON LINE (Area;-0.5;0.5;1)
   DR POLYGON LINE (Area;-0.5;-0.5;1)
   DR POLYGON LINE (Area;0.5;-0.5;1)
   $ID := DR End polygon (Area)

See Also

DR End polygon, DR POLYGON CURVE, DR START POLYGON.


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