Graphics.FillEllipse Método

Definição

Preenche o interior de uma elipse definida por um retângulo delimitador especificado por um par de coordenadas, uma largura e uma altura.

Sobrecargas

FillEllipse(Brush, Rectangle)

Preenche o interior de uma elipse definida por um retângulo delimitador especificado por uma estrutura Rectangle.

FillEllipse(Brush, RectangleF)

Preenche o interior de uma elipse definida por um retângulo delimitador especificado por uma estrutura RectangleF.

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

Preenche o interior de uma elipse definida por um retângulo delimitador especificado por um par de coordenadas, uma largura e uma altura.

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

Preenche o interior de uma elipse definida por um retângulo delimitador especificado por um par de coordenadas, uma largura e uma altura.

FillEllipse(Brush, Rectangle)

Origem:
Graphics.cs
Origem:
Graphics.cs
Origem:
Graphics.cs

Preenche o interior de uma elipse definida por um retângulo delimitador especificado por uma estrutura 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)

Parâmetros

brush
Brush

Brush que determina as características do preenchimento.

rect
Rectangle

Estrutura Rectangle que representa o retângulo delimitador que define a elipse.

Exceções

brush é null.

Exemplos

O exemplo de código a seguir foi projetado para uso com Windows Forms e requer PaintEventArgse, que é um parâmetro do Paint manipulador de eventos. O código executa as seguintes ações:

  • Cria um pincel vermelho sólido.

  • Cria um retângulo que limita uma elipse.

  • Preenche a elipse na tela.

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

Comentários

Esse método preenche o interior de uma elipse com um Brush. A elipse é definida pelo retângulo delimitador representado pelo rect parâmetro .

Aplica-se a

FillEllipse(Brush, RectangleF)

Origem:
Graphics.cs
Origem:
Graphics.cs
Origem:
Graphics.cs

Preenche o interior de uma elipse definida por um retângulo delimitador especificado por uma estrutura 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)

Parâmetros

brush
Brush

Brush que determina as características do preenchimento.

rect
RectangleF

Estrutura RectangleF que representa o retângulo delimitador que define a elipse.

Exceções

brush é null.

Exemplos

O exemplo de código a seguir foi projetado para uso com Windows Forms e requer PaintEventArgse, que é um parâmetro do Paint manipulador de eventos. O código executa as seguintes ações:

  • Cria um pincel vermelho sólido.

  • Cria um retângulo que limita uma elipse.

  • Preenche a elipse na tela.

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

Comentários

Esse método preenche o interior de uma elipse com um Brush. A elipse é definida pelo retângulo delimitador representado pelo rect parâmetro .

Aplica-se a

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

Origem:
Graphics.cs
Origem:
Graphics.cs
Origem:
Graphics.cs

Preenche o interior de uma elipse definida por um retângulo delimitador especificado por um par de coordenadas, uma largura e uma altura.

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)

Parâmetros

brush
Brush

Brush que determina as características do preenchimento.

x
Int32

A coordenada X do canto superior esquerdo do retângulo delimitador que define a elipse.

y
Int32

A coordenada y do canto superior esquerdo do retângulo delimitador que define a elipse.

width
Int32

Largura do retângulo delimitador que define a elipse.

height
Int32

Altura do retângulo delimitador que define a elipse.

Exceções

brush é null.

Exemplos

O exemplo de código a seguir foi projetado para uso com Windows Forms e requer PaintEventArgse, que é um parâmetro do Paint manipulador de eventos. O código executa as seguintes ações:

  • Cria um pincel vermelho sólido.

  • Cria o local e o tamanho de um retângulo que vincula uma elipse.

  • Preenche a elipse na tela.

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

Comentários

Esse método preenche o interior de uma elipse com um Brush. A elipse é definida pelo retângulo delimitador representado pelos xparâmetros , y, widthe height .

Aplica-se a

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

Origem:
Graphics.cs
Origem:
Graphics.cs
Origem:
Graphics.cs

Preenche o interior de uma elipse definida por um retângulo delimitador especificado por um par de coordenadas, uma largura e uma altura.

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)

Parâmetros

brush
Brush

Brush que determina as características do preenchimento.

x
Single

A coordenada X do canto superior esquerdo do retângulo delimitador que define a elipse.

y
Single

A coordenada y do canto superior esquerdo do retângulo delimitador que define a elipse.

width
Single

Largura do retângulo delimitador que define a elipse.

height
Single

Altura do retângulo delimitador que define a elipse.

Exceções

brush é null.

Exemplos

O exemplo de código a seguir foi projetado para uso com Windows Forms e requer PaintEventArgse, que é um parâmetro do Paint manipulador de eventos. O código executa as seguintes ações:

  • Cria um pincel vermelho sólido.

  • Cria o local e o tamanho de um retângulo que vincula uma elipse.

  • Preenche a elipse na tela.

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

Comentários

Esse método preenche o interior de uma elipse com um Brush. A elipse é definida pelo retângulo delimitador representado pelos xparâmetros , y, widthe height .

Aplica-se a