座標ペア、高さ、および幅で指定された外接する四角形によって定義される楕円を描画します。
Overloads Public Sub FillEllipse( _
ByVal brush As Brush, _ ByVal x As Integer, _ ByVal y As Integer, _ ByVal width As Integer, _ ByVal height As Integer _)
[C#]
public void FillEllipse(Brushbrush,intx,inty,intwidth,intheight);
[C++]
public: void FillEllipse(Brush* brush,intx,inty,intwidth,intheight);
[JScript]
public function FillEllipse(
brush : Brush,x : int,y : int,width : int,height : int);
パラメータ
- brush
塗りつぶしの特性を決定する Brush オブジェクト。 - x
楕円を定義する外接する四角形の左上隅の x 座標。 - y
楕円を定義する外接する四角形の左上隅の y 座標。 - width
楕円を定義する外接する四角形の幅。 - height
楕円を定義する外接する四角形の高さ。
戻り値
このメソッドは値を返しません。
解説
このメソッドは、楕円の内部を Brush オブジェクトで塗りつぶします。この楕円は、 x 、 y 、 width 、 height の各パラメータで表される外接する四角形によって定義されます。
使用例
[Visual Basic, C#] 次の例は、Windows フォームでの使用を意図してデザインされており、 Paint イベント ハンドラのパラメータである PaintEventArgs e が必要です。このコードは次のアクションを実行します。
- 赤いソリッド ブラシを作成します。
- 楕円に外接する四角形の位置とサイズを作成します。
- 画面の楕円を塗りつぶします。
Public Sub FillEllipseInt(e As PaintEventArgs)
' Create solid brush.
Dim redBrush As New SolidBrush(Color.Red)
' Create ___location and size of ellipse.
Dim x As Integer = 0
Dim y As Integer = 0
Dim width As Integer = 200
Dim height As Integer = 100
' Fill ellipse on screen.
e.Graphics.FillEllipse(redBrush, x, y, width, height)
End Sub
[C#]
public void FillEllipseInt(PaintEventArgs e)
{
// Create solid brush.
SolidBrush redBrush = new SolidBrush(Color.Red);
// Create ___location and size of ellipse.
int x = 0;
int y = 0;
int width = 200;
int height = 100;
// Fill ellipse on screen.
e.Graphics.FillEllipse(redBrush, x, y, width, height);
}
[C++, JScript] C++ および JScript のサンプルはありません。Visual Basic および C# のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET
参照
Graphics クラス | Graphics メンバ | System.Drawing 名前空間 | Graphics.FillEllipse オーバーロードの一覧