GraphicsPath.AddEllipse Método

Definición

Agrega una elipse al trazado actual.

Sobrecargas

AddEllipse(Rectangle)

Agrega una elipse al trazado actual.

AddEllipse(RectangleF)

Agrega una elipse al trazado actual.

AddEllipse(Int32, Int32, Int32, Int32)

Agrega una elipse al trazado actual.

AddEllipse(Single, Single, Single, Single)

Agrega una elipse al trazado actual.

AddEllipse(Rectangle)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

Agrega una elipse al trazado actual.

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

Rectangle que representa el rectángulo delimitador que define la elipse.

Ejemplos

El ejemplo de código siguiente está diseñado para su uso con Windows Forms y requiere PaintEventArgse, un OnPaint objeto de evento. El código realiza las siguientes acciones:

Crea un rectángulo delimitador que define una elipse.

Crea una ruta de acceso y agrega la elipse a la ruta de acceso.

Dibuja la ruta de acceso a la pantalla.

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

Se aplica a

AddEllipse(RectangleF)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

Agrega una elipse al trazado actual.

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

RectangleF que representa el rectángulo delimitador que define la elipse.

Ejemplos

Para obtener un ejemplo, consulte AddEllipse(Rectangle).

Se aplica a

AddEllipse(Int32, Int32, Int32, Int32)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

Agrega una elipse al trazado actual.

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

Coordenada X de la esquina superior izquierda del rectángulo delimitador que define la elipse.

y
Int32

Coordenada Y de la esquina superior izquierda del rectángulo delimitador que define la elipse.

width
Int32

Ancho del rectángulo delimitador que define la elipse.

height
Int32

Alto del rectángulo delimitador que define la elipse.

Ejemplos

Para obtener un ejemplo, consulte AddEllipse(Rectangle).

Se aplica a

AddEllipse(Single, Single, Single, Single)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

Agrega una elipse al trazado actual.

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

Coordenada X de la esquina superior izquierda del rectángulo delimitador que define la elipse.

y
Single

Coordenada y de la esquina superior izquierda del rectángulo delimitador que define la elipse.

width
Single

Ancho del rectángulo delimitador que define la elipse.

height
Single

Alto del rectángulo delimitador que define la elipse.

Ejemplos

Para obtener un ejemplo, consulte AddEllipse(Rectangle).

Se aplica a