다음을 통해 공유


GraphicsPath.AddEllipse 메서드

정의

현재 경로에 줄임표를 추가합니다.

오버로드

AddEllipse(Rectangle)

현재 경로에 줄임표를 추가합니다.

AddEllipse(RectangleF)

현재 경로에 줄임표를 추가합니다.

AddEllipse(Int32, Int32, Int32, Int32)

현재 경로에 줄임표를 추가합니다.

AddEllipse(Single, Single, Single, Single)

현재 경로에 줄임표를 추가합니다.

AddEllipse(Rectangle)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

현재 경로에 줄임표를 추가합니다.

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)

매개 변수

rect
Rectangle

줄임표를 정의하는 경계 사각형을 나타내는 Rectangle.

예제

다음 코드 예제는 Windows Forms에서 사용하도록 설계되었으며 OnPaint 이벤트 개체인 PaintEventArgse필요합니다. 코드는 다음 작업을 수행합니다.

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

경로를 만들고 줄임표를 경로에 추가합니다.

화면의 경로를 그립니다.

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

적용 대상

AddEllipse(RectangleF)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

현재 경로에 줄임표를 추가합니다.

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)

매개 변수

rect
RectangleF

줄임표를 정의하는 경계 사각형을 나타내는 RectangleF.

예제

예제는 AddEllipse(Rectangle)참조하세요.

적용 대상

AddEllipse(Int32, Int32, Int32, Int32)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

현재 경로에 줄임표를 추가합니다.

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)

매개 변수

x
Int32

줄임표를 정의하는 경계 사각형의 왼쪽 위 모퉁이에 대한 x 좌표입니다.

y
Int32

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

width
Int32

줄임표를 정의하는 경계 사각형의 너비입니다.

height
Int32

줄임표를 정의하는 경계 사각형의 높이입니다.

예제

예제는 AddEllipse(Rectangle)참조하세요.

적용 대상

AddEllipse(Single, Single, Single, Single)

Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs
Source:
GraphicsPath.cs

현재 경로에 줄임표를 추가합니다.

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)

매개 변수

x
Single

줄임표를 정의하는 경계 사각형의 왼쪽 위 모퉁이에 대한 x 좌표입니다.

y
Single

줄임표를 정의하는 경계 사각형의 왼쪽 위 모서리에 대한 y 좌표입니다.

width
Single

줄임표를 정의하는 경계 사각형의 너비입니다.

height
Single

줄임표를 정의하는 경계 사각형의 높이입니다.

예제

예제는 AddEllipse(Rectangle)참조하세요.

적용 대상