Creates a line passing through two points.

syntaxSyntax:
FWiz2DImage.DrawLine(p1, p2)

Parameters

Parameter Description
p1 A DlxPoint object with the coordinates specifying the line start point.
p2 A DlxPoint object with the coordinates specifying the line endpoint.

Return Value

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

Example

  Copy codeCopy code
function OnBuild2DImage()
{
  var ctx = FWiz.Get2DImageCtx();
  var style = FWiz.GetPenStyle(0);
  style.SetStyle("Marker pen blue");
  ctx.SetPenStyle(0);
  ctx.DrawLine(new DlxPoint(-20, -20), new DlxPoint(20, 20));
}

See also