Creates a cardinal spline from a list of vertices.

syntaxSyntax:
FWiz2DImage.DrawCurve(vertices)

Parameters

Parameter Description
vertices An array of DlxPoint objects that specify the coordinates that the cardinal spline passes through.

Return Value

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

Remarks

A segment is defined as a curve that connects two consecutive points in the cardinal spline. The ending point of each segment is the starting point for the next.

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.DrawCurve(vertices);
}

See also