Creates an ellipse, a circle or an arc.

DlxLayer.DrawEllipse(center, sizex, sizey = 0, startAngle = 0, stopAngle = 0, rotAngle = 0, flags = DlxApp.ELLIPSE_CCW)


Parameter Description
center A DlxPoint object with the coordinates specifying the center of the ellipse.
sizex A positive value that defines the radius of the circle or the half length of the horizontal axis of the ellipse.
sizey A positive value defining the half length of the vertical axis of the ellipse. If zero is specified, sizey is set equal to sizex.
startAngle The angle, in degrees, of the arc start.
stopAngle The angle, in degrees, of the end of the arc.
rotAngle The angle, in degrees, of rotation of the ellipse.
flags A combination of the following values:
Value Meaning
DlxApp.ELLIPSE_CW The arc is drawn clockwise.
DlxApp.ELLIPSE_CCW The arc is drawn counterclockwise.
DlxApp.ELLIPSE_EANGLE The startAngle and stopAngle values are referred to the ellipse otherwise they are referred to the circle.
DlxApp.ELLIPSE_CLOSED The arc is closed with segments in the center.
DlxApp.ELLIPSE_CHORD The arc is closed to the chord.

Return Value

The newly created DlxEllipse object. Call the IsValid() method to determine if the object was created correctly.


  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())
      layer.DrawEllipse(new DlxPoint(40, 40), 20);
      layer.DrawEllipse(new DlxPoint(130, 80), 40, 20);
      layer.DrawEllipse(new DlxPoint(30, 85), 30, 20, 0, 45, 0, DlxApp.ELLIPSE_CLOSED);

See also