Constructs a DlxFigure object.

syntaxSyntax:
new DlxFigure()

Example

  Copy codeCopy code
var prj = DlxApp.GetJob().GetProject("Example Sch");
if (!prj.IsValid())
  prj = DlxApp.GetJob().NewProject("Example Sch");
var doc = prj.GetDocument("Examples Sch", DlxApp.DOCTYPE_SCHEMATIC);
if (!doc.IsValid())
{
  doc = prj.NewDocument("Examples Sch", DlxApp.DOCTYPE_SCHEMATIC);
  doc.SetPageFormat("A4", false);
}
if (doc.IsValid() && doc.Activate())
{
  var page = doc.GetActivePage();
  if (page.IsValid())
  {
    var layer = page.GetLayerFromType(DlxApp.LAYERTYPE_DRAWING);
    if (layer.IsValid())
    { 
      // draw shape
      var figure = new DlxFigure();
      figure.BeginShape();
      figure.AddPoint(new DlxPoint(95,153.75));
      figure.AddPoint(new DlxPoint(101.25,153.75));
      figure.AddPoint(new DlxPoint(101.25,146.25), -180);
      figure.AddPoint(new DlxPoint(95,146.25));
      figure.EndShape(false);   
      figure.Widen(0.5, DlxApp.WIDENCAPS_FLAT, DlxApp.WIDENCAPS_FLAT, DlxApp.WIDENJOIN_FLAT);   

      var shape = layer.DrawShape(figure);
    }
  }
}

See also