GraphicsPath.AddEllipse Método

Definição

Adiciona uma elipse ao caminho atual.

Sobrecargas

AddEllipse(Rectangle)

Adiciona uma elipse ao caminho atual.

AddEllipse(RectangleF)

Adiciona uma elipse ao caminho atual.

AddEllipse(Int32, Int32, Int32, Int32)

Adiciona uma elipse ao caminho atual.

AddEllipse(Single, Single, Single, Single)

Adiciona uma elipse ao caminho atual.

AddEllipse(Rectangle)

Origem:
GraphicsPath.cs
Origem:
GraphicsPath.cs
Origem:
GraphicsPath.cs

Adiciona uma elipse ao caminho atual.

public:
 void AddEllipse(System::Drawing::Rectangle rect);
public void AddEllipse (System.Drawing.Rectangle rect);
member this.AddEllipse : System.Drawing.Rectangle -> unit
Public Sub AddEllipse (rect As Rectangle)

Parâmetros

rect
Rectangle

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

Exemplos

O exemplo de código a seguir foi projetado para uso com Windows Forms e requer PaintEventArgse, um OnPaint objeto de evento. O código executa as seguintes ações:

Cria um retângulo delimitador que define uma elipse.

Cria um caminho e adiciona a elipse ao caminho.

Desenha o caminho para a tela.

private:
   void AddEllipseExample( PaintEventArgs^ e )
   {
      // Create a path and add an ellipse.
      Rectangle myEllipse = Rectangle(20,20,100,50);
      GraphicsPath^ myPath = gcnew GraphicsPath;
      myPath->AddEllipse( myEllipse );

      // Draw the path to the screen.
      Pen^ myPen = gcnew Pen( Color::Black,2.0f );
      e->Graphics->DrawPath( myPen, myPath );
   }
private void AddEllipseExample(PaintEventArgs e)
{
             
    // Create a path and add an ellipse.
    Rectangle myEllipse = new Rectangle(20, 20, 100, 50);
    GraphicsPath myPath = new GraphicsPath();
    myPath.AddEllipse(myEllipse);
             
    // Draw the path to the screen.
    Pen myPen = new Pen(Color.Black, 2);
    e.Graphics.DrawPath(myPen, myPath);
}
Public Sub AddEllipseExample(ByVal e As PaintEventArgs)

    ' Create a path and add an ellipse.
    Dim myEllipse As New Rectangle(20, 20, 100, 50)
    Dim myPath As New GraphicsPath
    myPath.AddEllipse(myEllipse)

    ' Draw the path to the screen.
    Dim myPen As New Pen(Color.Black, 2)
    e.Graphics.DrawPath(myPen, myPath)
End Sub

Aplica-se a

AddEllipse(RectangleF)

Origem:
GraphicsPath.cs
Origem:
GraphicsPath.cs
Origem:
GraphicsPath.cs

Adiciona uma elipse ao caminho atual.

public:
 void AddEllipse(System::Drawing::RectangleF rect);
public void AddEllipse (System.Drawing.RectangleF rect);
member this.AddEllipse : System.Drawing.RectangleF -> unit
Public Sub AddEllipse (rect As RectangleF)

Parâmetros

rect
RectangleF

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

Exemplos

Para ver um exemplo, consulte AddEllipse(Rectangle).

Aplica-se a

AddEllipse(Int32, Int32, Int32, Int32)

Origem:
GraphicsPath.cs
Origem:
GraphicsPath.cs
Origem:
GraphicsPath.cs

Adiciona uma elipse ao caminho atual.

public:
 void AddEllipse(int x, int y, int width, int height);
public void AddEllipse (int x, int y, int width, int height);
member this.AddEllipse : int * int * int * int -> unit
Public Sub AddEllipse (x As Integer, y As Integer, width As Integer, height As Integer)

Parâmetros

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

A largura do retângulo delimitador que define a elipse.

height
Int32

A altura do retângulo delimitador que define a elipse.

Exemplos

Para ver um exemplo, consulte AddEllipse(Rectangle).

Aplica-se a

AddEllipse(Single, Single, Single, Single)

Origem:
GraphicsPath.cs
Origem:
GraphicsPath.cs
Origem:
GraphicsPath.cs

Adiciona uma elipse ao caminho atual.

public:
 void AddEllipse(float x, float y, float width, float height);
public void AddEllipse (float x, float y, float width, float height);
member this.AddEllipse : single * single * single * single -> unit
Public Sub AddEllipse (x As Single, y As Single, width As Single, height As Single)

Parâmetros

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

A largura do retângulo delimitador que define a elipse.

height
Single

A altura do retângulo delimitador que define a elipse.

Exemplos

Para ver um exemplo, consulte AddEllipse(Rectangle).

Aplica-se a