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
Źródło:
GraphicsPath.cs
Źródło:
GraphicsPath.cs

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

C#
public void AddEllipse (System.Drawing.Rectangle rect);

Parametry

rect
Rectangle

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

Przykłady

Poniższy przykład kodu jest przeznaczony do użycia z formularzami Systemu Windows i wymaga PaintEventArgse, obiektu zdarzenia OnPaint. 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.

C#
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);
}

Dotyczy

.NET 9 i inne wersje
Produkt Wersje
.NET 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

AddEllipse(RectangleF)

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

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

C#
public void AddEllipse (System.Drawing.RectangleF rect);

Parametry

rect
RectangleF

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

Przykłady

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

Dotyczy

.NET 9 i inne wersje
Produkt Wersje
.NET 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

AddEllipse(Int32, Int32, Int32, Int32)

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

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

C#
public void AddEllipse (int x, int y, int width, int height);

Parametry

x
Int32

Współrzędna x lewego górnego rogu prostokąta ograniczenia, który definiuje wielokropek.

y
Int32

Współrzędna y lewego górnego rogu prostokąta ograniczenia, który definiuje wielokropek.

width
Int32

Szerokość prostokąta ograniczenia, który definiuje wielokropek.

height
Int32

Wysokość prostokąta ograniczenia, który definiuje wielokropek.

Przykłady

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

Dotyczy

.NET 9 i inne wersje
Produkt Wersje
.NET 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

AddEllipse(Single, Single, Single, Single)

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

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

C#
public void AddEllipse (float x, float y, float width, float height);

Parametry

x
Single

Współrzędna x lewego górnego rogu prostokąta ograniczenia, który definiuje wielokropek.

y
Single

Współrzędna y lewego górnego rogu prostokąta ograniczenia, który definiuje wielokropek.

width
Single

Szerokość prostokąta ograniczenia, który definiuje wielokropek.

height
Single

Wysokość prostokąta ograniczenia, który definiuje wielokropek.

Przykłady

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

Dotyczy

.NET 9 i inne wersje
Produkt Wersje
.NET 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9