GraphicsPath.AddEllipse Metoda

Definicja

Dodaje wielokropek do bieżącej ścieżki.

Przeciążenia

AddEllipse(Rectangle)

Dodaje wielokropek do bieżącej ścieżki.

AddEllipse(RectangleF)

Dodaje wielokropek do bieżącej ścieżki.

AddEllipse(Int32, Int32, Int32, Int32)

Dodaje wielokropek do bieżącej ścieżki.

AddEllipse(Single, Single, Single, Single)

Dodaje wielokropek do bieżącej ścieżki.

AddEllipse(Rectangle)

Źródło:
GraphicsPath.cs
Źródło:
GraphicsPath.cs
Źródło:
GraphicsPath.cs

Dodaje wielokropek do bieżącej ścieżki.

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

Obiekt Rectangle reprezentujący prostokąt ograniczenia, który definiuje wielokropek.

Przykłady

Poniższy przykład kodu jest przeznaczony do użytku z Windows Forms i wymaga PaintEventArgseobiektu OnPaint zdarzenia . Kod wykonuje następujące akcje:

Tworzy prostokąt ograniczenia, który definiuje wielokropek.

Tworzy ścieżkę i dodaje wielokropek do ścieżki.

Rysuje ścieżkę do ekranu.

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

Dotyczy

AddEllipse(RectangleF)

Źródło:
GraphicsPath.cs
Źródło:
GraphicsPath.cs
Źródło:
GraphicsPath.cs

Dodaje wielokropek do bieżącej ścieżki.

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

Obiekt RectangleF reprezentujący prostokąt ograniczenia, który definiuje wielokropek.

Przykłady

Aby zapoznać się z przykładem, zobacz AddEllipse(Rectangle).

Dotyczy

AddEllipse(Int32, Int32, Int32, Int32)

Źródło:
GraphicsPath.cs
Źródło:
GraphicsPath.cs
Źródło:
GraphicsPath.cs

Dodaje wielokropek do bieżącej ścieżki.

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

Współrzędna x lewego górnego rogu prostokąta ograniczenia definiującego wielokropek.

y
Int32

Współrzędna y lewego górnego rogu prostokąta ograniczenia definiującego wielokropek.

width
Int32

Szerokość prostokąta ograniczenia definiującego wielokropek.

height
Int32

Wysokość prostokąta ograniczenia definiującego wielokropek.

Przykłady

Aby zapoznać się z przykładem, zobacz AddEllipse(Rectangle).

Dotyczy

AddEllipse(Single, Single, Single, Single)

Źródło:
GraphicsPath.cs
Źródło:
GraphicsPath.cs
Źródło:
GraphicsPath.cs

Dodaje wielokropek do bieżącej ścieżki.

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

Współrzędna x lewego górnego rogu prostokąta ograniczenia definiującego wielokropek.

y
Single

Współrzędna y lewego górnego rogu prostokąta ograniczenia definiującego wielokropek.

width
Single

Szerokość prostokąta ograniczenia definiującego wielokropek.

height
Single

Wysokość prostokąta ograniczenia definiującego wielokropek.

Przykłady

Aby zapoznać się z przykładem, zobacz AddEllipse(Rectangle).

Dotyczy