Draw an oval on the Canvas.
Syntax

[C#]

XRect DrawOval(double inWidth, double inHeight, DrawOptions inOptions);
XRect DrawOval(XRect inRect, DrawOptions inOptions);

[Visual Basic]

Function DrawOval(inWidth As Double, inHeight As Double, inOptions As DrawOptions) As XRect
Function DrawOval(inRect As XRect, inOptions As DrawOptions) As XRect
Params
Name Description
inWidth The oval width.
inHeight The oval height.
inOptions The draw options.
inRect The rectangle to draw.
return The drawn area.
Notes

Draw the specified oval on the Canvas using the properties specified in DrawOptions. If only the size is specified, the oval will be positioned using the align properties in DrawOptions.

See Also

DrawOptions

HAlign

VAlign

Example

Here we paint and draw a red oval.

[C#]Canvas canvas = new Canvas(250, 250);
canvas.PaintColor = new XColor(Color.Red);
canvas.PenColor = new XColor(Color.Red);
canvas.DrawOval(new XRect(25, 25, 200, 200), new DrawOptions(canvas));
canvas.SaveAs(Server.MapPath("Canvas_DrawOval_90.png"));


[Visual Basic]Dim canvas As New Canvas(250, 250)
canvas.PaintColor = New XColor(Color.Red)
canvas.PenColor = New XColor(Color.Red)
canvas.DrawOval(New XRect(25, 25, 200, 200), New DrawOptions(canvas))
canvas.SaveAs(Server.MapPath("Canvas_DrawOval_90.png"))



Canvas_DrawOval_90.png