Graphics.FillEllipse メソッド

定義

座標ペア、高さ、および幅で指定された外接する四角形によって定義される楕円を描画します。

オーバーロード

FillEllipse(Brush, Rectangle)

Rectangle 構造体で指定された外接する四角形によって定義される楕円の内部を塗りつぶします。

FillEllipse(Brush, RectangleF)

RectangleF 構造体で指定された外接する四角形によって定義される楕円の内部を塗りつぶします。

FillEllipse(Brush, Int32, Int32, Int32, Int32)

座標ペア、高さ、および幅で指定された外接する四角形によって定義される楕円を描画します。

FillEllipse(Brush, Single, Single, Single, Single)

座標ペア、高さ、および幅で指定された外接する四角形によって定義される楕円を描画します。

FillEllipse(Brush, Rectangle)

Rectangle 構造体で指定された外接する四角形によって定義される楕円の内部を塗りつぶします。

public:
 void FillEllipse(System::Drawing::Brush ^ brush, System::Drawing::Rectangle rect);
public void FillEllipse (System.Drawing.Brush brush, System.Drawing.Rectangle rect);
member this.FillEllipse : System.Drawing.Brush * System.Drawing.Rectangle -> unit
Public Sub FillEllipse (brush As Brush, rect As Rectangle)

パラメーター

brush
Brush

塗りつぶしの特性を決定する Brush

rect
Rectangle

楕円を定義する外接する四角形を表す Rectangle 構造体。

例外

brushnullです。

次のコード例は、Windows フォームで使用するように設計されており、イベント ハンドラーのPaintパラメーターである が必要PaintEventArgseです。 コードは、次のアクションを実行します。

  • 単色の赤いブラシを作成します。

  • 楕円を囲む四角形を作成します。

  • 画面上の楕円を塗りつぶします。

public:
   void FillEllipseRectangle( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      // Create rectangle for ellipse.
      int x = 0;
      int y = 0;
      int width = 200;
      int height = 100;
      Rectangle rect = Rectangle(x,y,width,height);

      // Fill ellipse on screen.
      e->Graphics->FillEllipse( redBrush, rect );
   }
public void FillEllipseRectangle(PaintEventArgs e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    // Create rectangle for ellipse.
    int x = 0;
    int y = 0;
    int width = 200;
    int height = 100;
    Rectangle rect = new Rectangle(x, y, width, height);
             
    // Fill ellipse on screen.
    e.Graphics.FillEllipse(redBrush, rect);
}
Public Sub FillEllipseRectangle(ByVal e As PaintEventArgs)

    ' Create solid brush.
    Dim redBrush As New SolidBrush(Color.Red)

    ' Create rectangle for ellipse.
    Dim x As Integer = 0
    Dim y As Integer = 0
    Dim width As Integer = 200
    Dim height As Integer = 100
    Dim rect As New Rectangle(x, y, width, height)

    ' Fill ellipse on screen.
    e.Graphics.FillEllipse(redBrush, rect)
End Sub

注釈

このメソッドは、楕円 Brushの内部に を塗りつぶします。 省略記号は、 パラメーターで表される外接する四角形によって rect 定義されます。

適用対象

FillEllipse(Brush, RectangleF)

RectangleF 構造体で指定された外接する四角形によって定義される楕円の内部を塗りつぶします。

public:
 void FillEllipse(System::Drawing::Brush ^ brush, System::Drawing::RectangleF rect);
public void FillEllipse (System.Drawing.Brush brush, System.Drawing.RectangleF rect);
member this.FillEllipse : System.Drawing.Brush * System.Drawing.RectangleF -> unit
Public Sub FillEllipse (brush As Brush, rect As RectangleF)

パラメーター

brush
Brush

塗りつぶしの特性を決定する Brush

rect
RectangleF

楕円を定義する外接する四角形を表す RectangleF 構造体。

例外

brushnullです。

次のコード例は、Windows フォームで使用するように設計されており、イベント ハンドラーのPaintパラメーターである が必要PaintEventArgseです。 コードは、次のアクションを実行します。

  • 単色の赤いブラシを作成します。

  • 楕円を囲む四角形を作成します。

  • 画面上の楕円を塗りつぶします。

public:
   void FillEllipseRectangleF( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      // Create rectangle for ellipse.
      float x = 0.0F;
      float y = 0.0F;
      float width = 200.0F;
      float height = 100.0F;
      RectangleF rect = RectangleF(x,y,width,height);

      // Fill ellipse on screen.
      e->Graphics->FillEllipse( redBrush, rect );
   }
public void FillEllipseRectangleF(PaintEventArgs e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    // Create rectangle for ellipse.
    float x = 0.0F;
    float y = 0.0F;
    float width = 200.0F;
    float height = 100.0F;
    RectangleF rect = new RectangleF(x, y, width, height);
             
    // Fill ellipse on screen.
    e.Graphics.FillEllipse(redBrush, rect);
}
Public Sub FillEllipseRectangleF(ByVal e As PaintEventArgs)

    ' Create solid brush.
    Dim redBrush As New SolidBrush(Color.Red)

    ' Create rectangle for ellipse.
    Dim x As Single = 0.0F
    Dim y As Single = 0.0F
    Dim width As Single = 200.0F
    Dim height As Single = 100.0F
    Dim rect As New RectangleF(x, y, width, height)

    ' Fill ellipse on screen.
    e.Graphics.FillEllipse(redBrush, rect)
End Sub

注釈

このメソッドは、楕円 Brushの内部に を塗りつぶします。 省略記号は、 パラメーターで表される外接する四角形によって rect 定義されます。

適用対象

FillEllipse(Brush, Int32, Int32, Int32, Int32)

座標ペア、高さ、および幅で指定された外接する四角形によって定義される楕円を描画します。

public:
 void FillEllipse(System::Drawing::Brush ^ brush, int x, int y, int width, int height);
public void FillEllipse (System.Drawing.Brush brush, int x, int y, int width, int height);
member this.FillEllipse : System.Drawing.Brush * int * int * int * int -> unit
Public Sub FillEllipse (brush As Brush, x As Integer, y As Integer, width As Integer, height As Integer)

パラメーター

brush
Brush

塗りつぶしの特性を決定する Brush

x
Int32

楕円を定義する外接する四角形の左上隅の x 座標。

y
Int32

楕円を定義する外接する四角形の左上隅の y 座標。

width
Int32

楕円を定義する外接する四角形の幅。

height
Int32

楕円を定義する外接する四角形の高さ。

例外

brushnullです。

次のコード例は、Windows フォームで使用するように設計されており、イベント ハンドラーのPaintパラメーターである が必要PaintEventArgseです。 コードは、次のアクションを実行します。

  • 単色の赤いブラシを作成します。

  • 楕円を囲む四角形の位置とサイズを作成します。

  • 画面上の楕円を塗りつぶします。

public:
   void FillEllipseInt( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew 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 );
   }
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);
}
Public Sub FillEllipseInt(ByVal 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

注釈

このメソッドは、楕円 Brushの内部に を塗りつぶします。 楕円は、および height パラメーターで表される外接する四角形によってyxwidth定義されます。

適用対象

FillEllipse(Brush, Single, Single, Single, Single)

座標ペア、高さ、および幅で指定された外接する四角形によって定義される楕円を描画します。

public:
 void FillEllipse(System::Drawing::Brush ^ brush, float x, float y, float width, float height);
public void FillEllipse (System.Drawing.Brush brush, float x, float y, float width, float height);
member this.FillEllipse : System.Drawing.Brush * single * single * single * single -> unit
Public Sub FillEllipse (brush As Brush, x As Single, y As Single, width As Single, height As Single)

パラメーター

brush
Brush

塗りつぶしの特性を決定する Brush

x
Single

楕円を定義する外接する四角形の左上隅の x 座標。

y
Single

楕円を定義する外接する四角形の左上隅の y 座標。

width
Single

楕円を定義する外接する四角形の幅。

height
Single

楕円を定義する外接する四角形の高さ。

例外

brushnullです。

次のコード例は、Windows フォームで使用するように設計されており、イベント ハンドラーのPaintパラメーターである が必要PaintEventArgseです。 コードは、次のアクションを実行します。

  • 単色の赤いブラシを作成します。

  • 楕円を囲む四角形の位置とサイズを作成します。

  • 画面上の楕円を塗りつぶします。

public:
   void FillEllipseFloat( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew 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 );
   }
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);
}
Public Sub FillEllipseFloat(ByVal e As PaintEventArgs)

    ' Create solid brush.
    Dim redBrush As New SolidBrush(Color.Red)

    ' Create location and size of ellipse.
    Dim x As Single = 0.0F
    Dim y As Single = 0.0F
    Dim width As Single = 200.0F
    Dim height As Single = 100.0F

    ' Fill ellipse on screen.
    e.Graphics.FillEllipse(redBrush, x, y, width, height)
End Sub

注釈

このメソッドは、楕円 Brushの内部に を塗りつぶします。 楕円は、および height パラメーターで表される外接する四角形によってyxwidth定義されます。

適用対象