Creates a polyline from a list of vertices.

syntaxSyntax:
FWiz2DImage.DrawPolyline(vertices)

Parameters

Parameter Description
vertices An array of DlxPoint objects with the coordinates used to create the polyline vertices.

Return Value

If an error occurs it returns false otherwise it returns true.

Remarks

Draws a series of contiguous line segments.

Example

  Copy codeCopy code
function OnBuild2DImage()
{
  var ctx = FWiz.Get2DImageCtx();
  var style = FWiz.GetPenStyle(0);
  style.SetStyle("Marker pen blue");
  ctx.SetPenStyle(0);
  var vertices = new Array();
  vertices[0] = new DlxPoint(-10,0);
  vertices[1] = new DlxPoint(-5,10);
  vertices[2] = new DlxPoint(0,0);
  vertices[3] = new DlxPoint(5,-10);
  vertices[4] = new DlxPoint(10,0);
  ctx.DrawPolyline(vertices);
}

See also