Constructs a DlxRect object.

syntaxSyntax:
new DlxRect()
new DlxRect(rect)
new DlxRect(left, bottom, right, top)

Parameters

Parameter Description
rect DlxRect object that is to be copied.
left Specifies the x-coordinate of the lower-left corner of the rectangle.
bottom Specifies the y-coordinate of the lower-left corner of the rectangle.
right Specifies the x-coordinate of the upper-right corner of the rectangle.
top Specifies the y-coordinate of the upper-right corner of the rectangle.

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 r = new DlxRect(10, 20, 80, 100);
    DlxApp.Printf("width=%.2f, height=%.2f", r.Width(), r.Height());
  }
}

See also