Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
Overload List
Fills the interior of an ellipse defined by a bounding rectangle specified by a Rectangle structure.
Supported by the .NET Compact Framework.
[Visual Basic] Overloads Public Sub FillEllipse(Brush, Rectangle)
[C#] public void FillEllipse(Brush, Rectangle);
[C++] public: void FillEllipse(Brush*, Rectangle);
[JScript] public function FillEllipse(Brush, Rectangle);
Fills the interior of an ellipse defined by a bounding rectangle specified by a RectangleF structure.
[Visual Basic] Overloads Public Sub FillEllipse(Brush, RectangleF)
[C#] public void FillEllipse(Brush, RectangleF);
[C++] public: void FillEllipse(Brush*, RectangleF);
[JScript] public function FillEllipse(Brush, RectangleF);
Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
Supported by the .NET Compact Framework.
[Visual Basic] Overloads Public Sub FillEllipse(Brush, Integer, Integer, Integer, Integer)
[C#] public void FillEllipse(Brush, int, int, int, int);
[C++] public: void FillEllipse(Brush*, int, int, int, int);
[JScript] public function FillEllipse(Brush, int, int, int, int);
Fills the interior of an ellipse defined by a bounding rectangle specified by a pair of coordinates, a width, and a height.
[Visual Basic] Overloads Public Sub FillEllipse(Brush, Single, Single, Single, Single)
[C#] public void FillEllipse(Brush, float, float, float, float);
[C++] public: void FillEllipse(Brush*, float, float, float, float);
[JScript] public function FillEllipse(Brush, float, float, float, float);
Example
[Visual Basic, C#] The following example is designed for use with Windows Forms, and it requires PaintEventArgs e, which is a parameter of the Paint event handler. The code performs the following actions:
- Creates a solid red brush.
- Creates the location and size of a rectangle that bounds an ellipse.
- Fills the ellipse on the screen.
[Visual Basic, C#] Note This example shows how to use one of the overloaded versions of FillEllipse. For other examples that might be available, see the individual overload topics.
[Visual Basic]
Public Sub FillEllipseFloat(e As PaintEventArgs)
' Create solid brush.
Dim redBrush As New SolidBrush(Color.Red)
' Create location and size of ellipse.
Dim x As Single = 0F
Dim y As Single = 0F
Dim width As Single = 200F
Dim height As Single = 100F
' Fill ellipse on screen.
e.Graphics.FillEllipse(redBrush, x, y, width, height)
End Sub
[C#]
public void FillEllipseFloat(PaintEventArgs e)
{
// Create solid brush.
SolidBrush redBrush = new SolidBrush(Color.Red);
// Create location and size of ellipse.
float x = 0.0F;
float y = 0.0F;
float width = 200.0F;
float height = 100.0F;
// Fill ellipse on screen.
e.Graphics.FillEllipse(redBrush, x, y, width, height);
}
[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button
in the upper-left corner of the page.
See Also
Graphics Class | Graphics Members | System.Drawing Namespace