# CanvasDrawEllipse

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Release: 4.6  •  5.0  •  5.1  •  5.2  •  5.3  •  5.4  •  6.0  •  6.1  •  6.2  •  6.3

New to Analytica 5.0

## CanvasDrawEllipse( canvas, x, y, width, height, lineColor, fillColor, lineWidth, startAngle, sweepAngle, pie, dash, swapXY )

Draws a ellipse on a canvas. Special cases include drawing of a circle, an arc, and a pie wedge.

• «canvas» is a canvas obtained from calling the Canvas() function, or a canvas context obtained by calling the CanvasContext() function.
• «x», «y»: The location of the top-left corner of the rectangle that circumscribes the ellipse.
• «width», «height»: The size of the rectangle that circumscribes the ellipse.
• «lineColor», «fillColor»: (Optional) The color for the edge and fill respectively, each is either a textual color name or a color integer. See Color parameters for an enumeration of textual color names and a description of color integers. «lineColor» defaults to 'Black'.
• «lineWidth»: (Optional) The width of the border line. Defaults to 1.0.
• «startAngle», «sweepAngle»: (Optional) The portion of the arc or pie wedge to draw in degrees. A «startAngle» of zero is along the x-axis, and then positive values rotate clockwise (unless CanvasContext has been used to invert the coordinate system).
• «pie»: (Optional) When True, radial border lines are rendered. This is useful when «sweepAngle» is less that 360 degrees. When «pie» is not true, the border line, is drawn, will be an arc without radial lines extending to the center.
• «dash»; (Optional) The dither style of the border line, one of: 'Solid', 'Dash', 'Dot', 'DashDot', 'DashDotDot'.
• «swapXY»: (Optional) swaps the parameters «x» with «y» and «width» with «height».

When «fillColor» is omitted, the border is drawn and the ellipse or pie wedge is not filled. When fill color is specified but note of the line-relevant parameters is specified (i.e., «lineColor», «lineWidth», «pie» or «dash»), the ellipse is filled and no border line is drawn. When «fillColor» and at least one line-relevant parameter is specified, the ellipse is drawn filled with a border line.