Graphics.FillEllipse Metoda

Definice

Vyplní vnitřní část elipsy definované ohraničující obdélník určený dvojicí souřadnic, šířkou a výškou.

Přetížení

FillEllipse(Brush, Rectangle)

Vyplní vnitřní část elipsy definované ohraničující obdélník určený strukturou Rectangle .

FillEllipse(Brush, RectangleF)

Vyplní vnitřní část elipsy definované ohraničující obdélník určený strukturou RectangleF .

FillEllipse(Brush, Int32, Int32, Int32, Int32)

Vyplní vnitřní část elipsy definované ohraničující obdélník určený dvojicí souřadnic, šířkou a výškou.

FillEllipse(Brush, Single, Single, Single, Single)

Vyplní vnitřní část elipsy definované ohraničující obdélník určený dvojicí souřadnic, šířkou a výškou.

FillEllipse(Brush, Rectangle)

Zdroj:
Graphics.cs
Zdroj:
Graphics.cs
Zdroj:
Graphics.cs

Vyplní vnitřní část elipsy definované ohraničující obdélník určený strukturou Rectangle .

public:
 void FillEllipse(System::Drawing::Brush ^ brush, System::Drawing::Rectangle rect);
public void FillEllipse (System.Drawing.Brush brush, System.Drawing.Rectangle rect);
member this.FillEllipse : System.Drawing.Brush * System.Drawing.Rectangle -> unit
Public Sub FillEllipse (brush As Brush, rect As Rectangle)

Parametry

brush
Brush

Brush , která určuje charakteristiky výplně.

rect
Rectangle

Rectangle struktury, která představuje ohraničující obdélník, který definuje elipsu.

Výjimky

brush je null.

Příklady

Následující příklad kódu je navržený pro použití s model Windows Forms a vyžaduje PaintEventArgse, což je parametr obslužné rutiny Paint události. Kód provede následující akce:

  • Vytvoří plný červený štětec.

  • Vytvoří obdélník, který ohraničuje tři tečky.

  • Vyplní tři tečky na obrazovce.

public:
   void FillEllipseRectangle( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      // Create rectangle for ellipse.
      int x = 0;
      int y = 0;
      int width = 200;
      int height = 100;
      Rectangle rect = Rectangle(x,y,width,height);

      // Fill ellipse on screen.
      e->Graphics->FillEllipse( redBrush, rect );
   }
public void FillEllipseRectangle(PaintEventArgs e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    // Create rectangle for ellipse.
    int x = 0;
    int y = 0;
    int width = 200;
    int height = 100;
    Rectangle rect = new Rectangle(x, y, width, height);
             
    // Fill ellipse on screen.
    e.Graphics.FillEllipse(redBrush, rect);
}
Public Sub FillEllipseRectangle(ByVal e As PaintEventArgs)

    ' Create solid brush.
    Dim redBrush As New SolidBrush(Color.Red)

    ' Create rectangle for ellipse.
    Dim x As Integer = 0
    Dim y As Integer = 0
    Dim width As Integer = 200
    Dim height As Integer = 100
    Dim rect As New Rectangle(x, y, width, height)

    ' Fill ellipse on screen.
    e.Graphics.FillEllipse(redBrush, rect)
End Sub

Poznámky

Tato metoda vyplní vnitřní část elipsy objektem Brush. Elipsa je definována ohraničující obdélník reprezentovaný parametrem rect .

Platí pro

FillEllipse(Brush, RectangleF)

Zdroj:
Graphics.cs
Zdroj:
Graphics.cs
Zdroj:
Graphics.cs

Vyplní vnitřní část elipsy definované ohraničující obdélník určený strukturou RectangleF .

public:
 void FillEllipse(System::Drawing::Brush ^ brush, System::Drawing::RectangleF rect);
public void FillEllipse (System.Drawing.Brush brush, System.Drawing.RectangleF rect);
member this.FillEllipse : System.Drawing.Brush * System.Drawing.RectangleF -> unit
Public Sub FillEllipse (brush As Brush, rect As RectangleF)

Parametry

brush
Brush

Brush , která určuje charakteristiky výplně.

rect
RectangleF

RectangleF struktury, která představuje ohraničující obdélník, který definuje elipsu.

Výjimky

brush je null.

Příklady

Následující příklad kódu je navržený pro použití s model Windows Forms a vyžaduje PaintEventArgse, což je parametr obslužné rutiny Paint události. Kód provede následující akce:

  • Vytvoří plný červený štětec.

  • Vytvoří obdélník, který ohraničuje tři tečky.

  • Vyplní tři tečky na obrazovce.

public:
   void FillEllipseRectangleF( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      // Create rectangle for ellipse.
      float x = 0.0F;
      float y = 0.0F;
      float width = 200.0F;
      float height = 100.0F;
      RectangleF rect = RectangleF(x,y,width,height);

      // Fill ellipse on screen.
      e->Graphics->FillEllipse( redBrush, rect );
   }
public void FillEllipseRectangleF(PaintEventArgs e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    // Create rectangle for ellipse.
    float x = 0.0F;
    float y = 0.0F;
    float width = 200.0F;
    float height = 100.0F;
    RectangleF rect = new RectangleF(x, y, width, height);
             
    // Fill ellipse on screen.
    e.Graphics.FillEllipse(redBrush, rect);
}
Public Sub FillEllipseRectangleF(ByVal e As PaintEventArgs)

    ' Create solid brush.
    Dim redBrush As New SolidBrush(Color.Red)

    ' Create rectangle for ellipse.
    Dim x As Single = 0.0F
    Dim y As Single = 0.0F
    Dim width As Single = 200.0F
    Dim height As Single = 100.0F
    Dim rect As New RectangleF(x, y, width, height)

    ' Fill ellipse on screen.
    e.Graphics.FillEllipse(redBrush, rect)
End Sub

Poznámky

Tato metoda vyplní vnitřní část elipsy objektem Brush. Elipsa je definována ohraničující obdélník reprezentovaný parametrem rect .

Platí pro

FillEllipse(Brush, Int32, Int32, Int32, Int32)

Zdroj:
Graphics.cs
Zdroj:
Graphics.cs
Zdroj:
Graphics.cs

Vyplní vnitřní část elipsy definované ohraničující obdélník určený dvojicí souřadnic, šířkou a výškou.

public:
 void FillEllipse(System::Drawing::Brush ^ brush, int x, int y, int width, int height);
public void FillEllipse (System.Drawing.Brush brush, int x, int y, int width, int height);
member this.FillEllipse : System.Drawing.Brush * int * int * int * int -> unit
Public Sub FillEllipse (brush As Brush, x As Integer, y As Integer, width As Integer, height As Integer)

Parametry

brush
Brush

Brush , která určuje charakteristiky výplně.

x
Int32

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

y
Int32

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

width
Int32

Šířka ohraničujícího obdélníku, který definuje elipsu.

height
Int32

Výška ohraničujícího obdélníku, který definuje elipsu.

Výjimky

brush je null.

Příklady

Následující příklad kódu je navržený pro použití s model Windows Forms a vyžaduje PaintEventArgse, což je parametr obslužné rutiny Paint události. Kód provede následující akce:

  • Vytvoří plný červený štětec.

  • Vytvoří umístění a velikost obdélníku, který ohraničuje elipsu.

  • Vyplní tři tečky na obrazovce.

public:
   void FillEllipseInt( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      // Create location and size of ellipse.
      int x = 0;
      int y = 0;
      int width = 200;
      int height = 100;

      // Fill ellipse on screen.
      e->Graphics->FillEllipse( redBrush, x, y, width, height );
   }
public void FillEllipseInt(PaintEventArgs e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    // Create location and size of ellipse.
    int x = 0;
    int y = 0;
    int width = 200;
    int height = 100;
             
    // Fill ellipse on screen.
    e.Graphics.FillEllipse(redBrush, x, y, width, height);
}
Public Sub FillEllipseInt(ByVal e As PaintEventArgs)

    ' Create solid brush.
    Dim redBrush As New SolidBrush(Color.Red)

    ' Create location and size of ellipse.
    Dim x As Integer = 0
    Dim y As Integer = 0
    Dim width As Integer = 200
    Dim height As Integer = 100

    ' Fill ellipse on screen.
    e.Graphics.FillEllipse(redBrush, x, y, width, height)
End Sub

Poznámky

Tato metoda vyplní vnitřní část elipsy objektem Brush. Elipsa je definována ohraničující obdélník reprezentovaný xparametry , y, widtha height .

Platí pro

FillEllipse(Brush, Single, Single, Single, Single)

Zdroj:
Graphics.cs
Zdroj:
Graphics.cs
Zdroj:
Graphics.cs

Vyplní vnitřní část elipsy definované ohraničující obdélník určený dvojicí souřadnic, šířkou a výškou.

public:
 void FillEllipse(System::Drawing::Brush ^ brush, float x, float y, float width, float height);
public void FillEllipse (System.Drawing.Brush brush, float x, float y, float width, float height);
member this.FillEllipse : System.Drawing.Brush * single * single * single * single -> unit
Public Sub FillEllipse (brush As Brush, x As Single, y As Single, width As Single, height As Single)

Parametry

brush
Brush

Brush , která určuje charakteristiky výplně.

x
Single

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

y
Single

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

width
Single

Šířka ohraničujícího obdélníku, který definuje elipsu.

height
Single

Výška ohraničujícího obdélníku, který definuje elipsu.

Výjimky

brush je null.

Příklady

Následující příklad kódu je navržený pro použití s model Windows Forms a vyžaduje PaintEventArgse, což je parametr obslužné rutiny Paint události. Kód provede následující akce:

  • Vytvoří plný červený štětec.

  • Vytvoří umístění a velikost obdélníku, který ohraničuje elipsu.

  • Vyplní tři tečky na obrazovce.

public:
   void FillEllipseFloat( PaintEventArgs^ e )
   {
      // Create solid brush.
      SolidBrush^ redBrush = gcnew SolidBrush( Color::Red );

      // Create location and size of ellipse.
      float x = 0.0F;
      float y = 0.0F;
      float width = 200.0F;
      float height = 100.0F;

      // Fill ellipse on screen.
      e->Graphics->FillEllipse( redBrush, x, y, width, height );
   }
public void FillEllipseFloat(PaintEventArgs e)
{
             
    // Create solid brush.
    SolidBrush redBrush = new SolidBrush(Color.Red);
             
    // Create location and size of ellipse.
    float x = 0.0F;
    float y = 0.0F;
    float width = 200.0F;
    float height = 100.0F;
             
    // Fill ellipse on screen.
    e.Graphics.FillEllipse(redBrush, x, y, width, height);
}
Public Sub FillEllipseFloat(ByVal e As PaintEventArgs)

    ' Create solid brush.
    Dim redBrush As New SolidBrush(Color.Red)

    ' Create location and size of ellipse.
    Dim x As Single = 0.0F
    Dim y As Single = 0.0F
    Dim width As Single = 200.0F
    Dim height As Single = 100.0F

    ' Fill ellipse on screen.
    e.Graphics.FillEllipse(redBrush, x, y, width, height)
End Sub

Poznámky

Tato metoda vyplní vnitřní část elipsy objektem Brush. Elipsa je definována ohraničující obdélník reprezentovaný xparametry , y, widtha height .

Platí pro