GraphicsPath.AddEllipse メソッド

定義

現在のパスに楕円を追加します。

オーバーロード

AddEllipse(Rectangle)

現在のパスに楕円を追加します。

AddEllipse(RectangleF)

現在のパスに楕円を追加します。

AddEllipse(Int32, Int32, Int32, Int32)

現在のパスに楕円を追加します。

AddEllipse(Single, Single, Single, Single)

現在のパスに楕円を追加します。

AddEllipse(Rectangle)

ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs
ソース:
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 フォームで使用するように設計されており、イベント オブジェクトが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)

ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs
ソース:
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)

ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs
ソース:
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)

ソース:
GraphicsPath.cs
ソース:
GraphicsPath.cs
ソース:
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)」を参照してください。

適用対象