Partage via


GraphicsPath.AddEllipse Méthode

Définition

Ajoute un ellipse au chemin actuel.

Surcharges

AddEllipse(Rectangle)

Ajoute un ellipse au chemin actuel.

AddEllipse(RectangleF)

Ajoute un ellipse au chemin actuel.

AddEllipse(Int32, Int32, Int32, Int32)

Ajoute un ellipse au chemin actuel.

AddEllipse(Single, Single, Single, Single)

Ajoute un ellipse au chemin actuel.

AddEllipse(Rectangle)

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

Ajoute un ellipse au chemin actuel.

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)

Paramètres

rect
Rectangle

Un Rectangle qui représente le rectangle englobant qui définit l’ellipse.

Exemples

L’exemple de code suivant est conçu pour être utilisé avec Windows Forms et nécessite PaintEventArgse, un objet d’événement OnPaint. Le code effectue les actions suivantes :

Crée un rectangle englobant qui définit un ellipse.

Crée un chemin et ajoute l’ellipse au chemin.

Dessine le chemin d’accès à l’écran.

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

S’applique à

AddEllipse(RectangleF)

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

Ajoute un ellipse au chemin actuel.

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)

Paramètres

rect
RectangleF

Un RectangleF qui représente le rectangle englobant qui définit l’ellipse.

Exemples

Pour obtenir un exemple, consultez AddEllipse(Rectangle).

S’applique à

AddEllipse(Int32, Int32, Int32, Int32)

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

Ajoute un ellipse au chemin actuel.

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)

Paramètres

x
Int32

Coordonnée x du coin supérieur gauche du rectangle englobant qui définit l’ellipse.

y
Int32

Coordonnée y du coin supérieur gauche du rectangle englobant qui définit l’ellipse.

width
Int32

Largeur du rectangle englobant qui définit l’ellipse.

height
Int32

Hauteur du rectangle englobant qui définit l’ellipse.

Exemples

Pour obtenir un exemple, consultez AddEllipse(Rectangle).

S’applique à

AddEllipse(Single, Single, Single, Single)

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

Ajoute un ellipse au chemin actuel.

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)

Paramètres

x
Single

Coordonnée x du coin supérieur gauche du rectangle englobant qui définit l’ellipse.

y
Single

Coordonnée y du coin supérieur gauche du rectangle englobant qui définit l’ellipse.

width
Single

Largeur du rectangle englobant qui définit l’ellipse.

height
Single

Hauteur du rectangle englobant qui définit l’ellipse.

Exemples

Pour obtenir un exemple, consultez AddEllipse(Rectangle).

S’applique à