Graphics.FillEllipse 메서드

정의

좌표, 너비, 높이의 쌍으로 지정된 경계 사각형에 의해 정의되는 타원의 내부를 채웁니다.

오버로드

FillEllipse(Brush, Rectangle)

Rectangle 구조체에 의해 지정된 경계 사각형에 의해 정의되는 타원의 내부를 채웁니다.

FillEllipse(Brush, RectangleF)

RectangleF 구조체에 의해 지정된 경계 사각형에 의해 정의되는 타원의 내부를 채웁니다.

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

좌표, 너비, 높이의 쌍으로 지정된 경계 사각형에 의해 정의되는 타원의 내부를 채웁니다.

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

좌표, 너비, 높이의 쌍으로 지정된 경계 사각형에 의해 정의되는 타원의 내부를 채웁니다.

FillEllipse(Brush, Rectangle)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

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)

매개 변수

brush
Brush

채우기의 특징을 결정하는 Brush입니다.

rect
Rectangle

타원을 정의하는 경계 사각형을 나타내는 Rectangle 구조체입니다.

예외

brush이(가) null인 경우

예제

다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse 코드는 다음 작업을 수행합니다.

  • 단색 빨간색 브러시를 만듭니다.

  • 줄임표를 경계로 하는 사각형을 만듭니다.

  • 화면의 줄임표를 채웁니다.

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

설명

이 메서드는 타원 Brush의 내부를 로 채웁니다. 타원은 매개 변수가 나타내는 경계 사각형으로 rect 정의됩니다.

적용 대상

FillEllipse(Brush, RectangleF)

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

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)

매개 변수

brush
Brush

채우기의 특징을 결정하는 Brush입니다.

rect
RectangleF

타원을 정의하는 경계 사각형을 나타내는 RectangleF 구조체입니다.

예외

brush이(가) null인 경우

예제

다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse 코드는 다음 작업을 수행합니다.

  • 단색 빨간색 브러시를 만듭니다.

  • 줄임표를 경계로 하는 사각형을 만듭니다.

  • 화면의 줄임표를 채웁니다.

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

설명

이 메서드는 타원 Brush의 내부를 로 채웁니다. 타원은 매개 변수가 나타내는 경계 사각형으로 rect 정의됩니다.

적용 대상

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

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

좌표, 너비, 높이의 쌍으로 지정된 경계 사각형에 의해 정의되는 타원의 내부를 채웁니다.

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)

매개 변수

brush
Brush

채우기의 특징을 결정하는 Brush입니다.

x
Int32

타원을 정의하는 경계 사각형의 왼쪽 위 모퉁이에 대한 X좌표입니다.

y
Int32

타원을 정의하는 경계 사각형의 왼쪽 위 모퉁이에 대한 Y좌표입니다.

width
Int32

타원을 정의하는 경계 사각형의 너비입니다.

height
Int32

타원을 정의하는 경계 사각형의 높이입니다.

예외

brush이(가) null인 경우

예제

다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse 코드는 다음 작업을 수행합니다.

  • 단색 빨간색 브러시를 만듭니다.

  • 타원을 경계로 하는 사각형의 위치와 크기를 만듭니다.

  • 화면의 줄임표를 채웁니다.

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

설명

이 메서드는 타원 Brush의 내부를 로 채웁니다. 타원은 , , ywidthheight 매개 변수로 표시되는 경계 사각형으로 x정의됩니다.

적용 대상

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

Source:
Graphics.cs
Source:
Graphics.cs
Source:
Graphics.cs

좌표, 너비, 높이의 쌍으로 지정된 경계 사각형에 의해 정의되는 타원의 내부를 채웁니다.

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)

매개 변수

brush
Brush

채우기의 특징을 결정하는 Brush입니다.

x
Single

타원을 정의하는 경계 사각형의 왼쪽 위 모퉁이에 대한 X좌표입니다.

y
Single

타원을 정의하는 경계 사각형의 왼쪽 위 모퉁이에 대한 Y좌표입니다.

width
Single

타원을 정의하는 경계 사각형의 너비입니다.

height
Single

타원을 정의하는 경계 사각형의 높이입니다.

예외

brush이(가) null인 경우

예제

다음 코드 예제는 Windows Forms 사용하도록 설계되었으며 이벤트 처리기의 Paint 매개 변수인 가 필요합니다.PaintEventArgse 코드는 다음 작업을 수행합니다.

  • 단색 빨간색 브러시를 만듭니다.

  • 타원을 경계로 하는 사각형의 위치와 크기를 만듭니다.

  • 화면의 줄임표를 채웁니다.

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

설명

이 메서드는 타원 Brush의 내부를 로 채웁니다. 타원은 , , ywidthheight 매개 변수로 표시되는 경계 사각형으로 x정의됩니다.

적용 대상