Creates an ellipse, a circle or an arc.

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

Parameters

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

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

Example

  Copy codeCopy code
function OnBuildAssembly()
{
  var ctx = FWiz.GetAssemblyCtx();
  var pen = FWiz.GetPenStyle(0);
  pen.SetStyle("Marker pen blue");
  ctx.SetPenStyle(pen);
  var brush = FWiz.GetBrushStyle(0);
  brush.SetStyle("Yellow");
  ctx.SetBrushStyle(brush);   
  ctx.DrawEllipse(new DlxPoint(0, 15), 10);
  ctx.DrawEllipse(new DlxPoint(0, 0), 40, 10);
  ctx.DrawEllipse(new DlxPoint(0, -15), 30, 20, 0, 45, 0, DlxApp.ELLIPSE_CLOSED);
}

See also