GraphicsPath.AddEllipse Metoda

Definice

Přidá tři tečky k aktuální cestě.

Přetížení

AddEllipse(Rectangle)

Přidá tři tečky k aktuální cestě.

AddEllipse(RectangleF)

Přidá tři tečky k aktuální cestě.

AddEllipse(Int32, Int32, Int32, Int32)

Přidá tři tečky k aktuální cestě.

AddEllipse(Single, Single, Single, Single)

Přidá tři tečky k aktuální cestě.

AddEllipse(Rectangle)

Zdroj:
GraphicsPath.cs
Zdroj:
GraphicsPath.cs
Zdroj:
GraphicsPath.cs

Přidá tři tečky k aktuální cestě.

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)

Parametry

rect
Rectangle

A Rectangle , který představuje ohraničující obdélník, který definuje tři tečky.

Příklady

Následující příklad kódu je navržený pro použití s model Windows Forms a vyžaduje PaintEventArgseOnPaint objekt události. Kód provede následující akce:

Vytvoří ohraničující obdélník, který definuje tři tečky.

Vytvoří cestu a přidá do cesty tři tečky.

Nakreslí cestu k obrazovce.

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

Platí pro

AddEllipse(RectangleF)

Zdroj:
GraphicsPath.cs
Zdroj:
GraphicsPath.cs
Zdroj:
GraphicsPath.cs

Přidá tři tečky k aktuální cestě.

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)

Parametry

rect
RectangleF

A RectangleF , který představuje ohraničující obdélník, který definuje tři tečky.

Příklady

Příklad naleznete v tématu AddEllipse(Rectangle).

Platí pro

AddEllipse(Int32, Int32, Int32, Int32)

Zdroj:
GraphicsPath.cs
Zdroj:
GraphicsPath.cs
Zdroj:
GraphicsPath.cs

Přidá tři tečky k aktuální cestě.

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)

Parametry

x
Int32

Souřadnice x levého horního rohu ohraničujícího obdélníku, který definuje tři tečky.

y
Int32

Souřadnice y levého horního rohu ohraničujícího obdélníku, který definuje tři tečky.

width
Int32

Šířka ohraničujícího obdélníku, který definuje tři tečky.

height
Int32

Výška ohraničujícího obdélníku, který definuje tři tečky.

Příklady

Příklad naleznete v tématu AddEllipse(Rectangle).

Platí pro

AddEllipse(Single, Single, Single, Single)

Zdroj:
GraphicsPath.cs
Zdroj:
GraphicsPath.cs
Zdroj:
GraphicsPath.cs

Přidá tři tečky k aktuální cestě.

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)

Parametry

x
Single

Souřadnice x levého horního rohu ohraničujícího obdélníku, který definuje tři tečky.

y
Single

Souřadnice y levého horního rohu ohraničujícího obdélníku, který definuje tři tečky.

width
Single

Šířka ohraničujícího obdélníku, který definuje tři tečky.

height
Single

Výška ohraničujícího obdélníku, který definuje tři tečky.

Příklady

Příklad naleznete v tématu AddEllipse(Rectangle).

Platí pro