GRAPHIC POLYLINE statement  

Purpose

Draw a series of connected line segments.

Syntax

GRAPHIC POLYLINE points [, rgbColor&]

Remarks

The graphic target must first be selected with GRAPHIC ATTACH.  The Coordinates are specified in the same terms (pixels or dialog units) as the parent dialog (or world coordinates, if those were chosen with GRAPHIC SCALE).  Line width can be set using GRAPHIC WIDTH.  If line width is set to 1 (the default), the line style can be set with GRAPHIC STYLEGRAPHIC POLYLINE neither uses, nor updates, the last point referenced (POS).

points

User-defined type that defines the number of vertices and the location of each.  There must be at least two, and no more than 1024 vertices.  The first member is a long integer point count, followed directly by the appropriate number of single precision floats to specify the actual coordinates.  Floating point coordinates are required, because of the possibility of their use as world coordinates with SCALE.  You can use a type with a scalar list, like this:

TYPE PolyPoints

  count as long

  x1 as single

  y1 as single

  x2 as single

  y2 as single

  x3 as single

  y3 as single

END TYPE

Or, you can create an array using point types, like this:

TYPE PolyPoint

  x as single

  y as single

END TYPE

 

TYPE PolyArray

  count as long

  xy(1 TO 3) as PolyPoint

END TYPE

rgbColor&

Optional RGB color of the polyline.  If omitted (or -1), the color defaults to the current foreground color.

See also

GRAPHIC ARC, GRAPHIC ATTACH, GRAPHIC BOX, GRAPHIC COLOR, GRAPHIC ELLIPSE, GRAPHIC LINE, GRAPHIC POLYGON, GRAPHIC STYLE, GRAPHIC WIDTH