Declare Function Ellipse Lib "gdi32.dll" (ByVal hdc As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Platforms: Win32s, Win 95/98, Win NT
Ellipse draws an ellipse on a device. The two coordinate pairs passed to the function are not part of the ellipse itself, but define its bounding rectangle. The bounding rectangle is the smallest possible rectangle containing the ellipse. The ellipse is drawn using the device's current drawing color and is filled using the current filling color and brush, if any. The function returns 0 if it fails, or 1 if it succeeds.
Example:
' Draw a red ellipse with bounding rectangle (25,30)-(100,75)
' on PictureBox1
Dim retval As Long ' return value
PictureBox1.ForeColor = RGB(255, 0, 0) ' set color to draw in to red
retval = Ellipse(PictureBox1.hdc, 25, 30, 100, 75)
See Also: AngleArc, Arc, ArcTo, Chord, Pie
Category: Filled Shapes
Go back to the alphabetical Function listing.
Go back to the Reference section index.
This page is copyright © 2000 Paul Kuliniewicz. Copyright Information.
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/e/ellipse.html