GraphicsPath.AddPie メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
パスに扇形のアウトラインを追加します。
オーバーロード
AddPie(Rectangle, Single, Single) |
パスに扇形のアウトラインを追加します。 |
AddPie(Int32, Int32, Int32, Int32, Single, Single) |
パスに扇形のアウトラインを追加します。 |
AddPie(Single, Single, Single, Single, Single, Single) |
パスに扇形のアウトラインを追加します。 |
AddPie(Rectangle, Single, Single)
パスに扇形のアウトラインを追加します。
public:
void AddPie(System::Drawing::Rectangle rect, float startAngle, float sweepAngle);
public void AddPie (System.Drawing.Rectangle rect, float startAngle, float sweepAngle);
member this.AddPie : System.Drawing.Rectangle * single * single -> unit
Public Sub AddPie (rect As Rectangle, startAngle As Single, sweepAngle As Single)
パラメーター
- startAngle
- Single
x 軸から時計回りに測定した、扇型部分の開始角度。
- sweepAngle
- Single
startAngle
から時計回りで測定した、startAngle
と扇型部分の終端との間の角度。
例
例については、「AddPie(Int32, Int32, Int32, Int32, Single, Single)」を参照してください。
注釈
円形状は、楕円の部分的な輪郭と、部分アウトラインの端点と交差する 2 つの放射状線によって定義されます。 部分アウトラインは で startAngle
始まり (x 軸から時計回りに測定)、 で startAngle
+ sweepAngle
終わります。
適用対象
AddPie(Int32, Int32, Int32, Int32, Single, Single)
パスに扇形のアウトラインを追加します。
public:
void AddPie(int x, int y, int width, int height, float startAngle, float sweepAngle);
public void AddPie (int x, int y, int width, int height, float startAngle, float sweepAngle);
member this.AddPie : int * int * int * int * single * single -> unit
Public Sub AddPie (x As Integer, y As Integer, width As Integer, height As Integer, startAngle As Single, sweepAngle As Single)
パラメーター
- x
- Int32
扇形の描画元となる楕円を定義する外接する四角形の左上隅の x 座標。
- y
- Int32
扇形の描画元となる楕円を定義する外接する四角形の左上隅の y 座標。
- width
- Int32
扇形の描画元となる楕円を定義する外接する四角形の幅。
- height
- Int32
扇形の描画元となる楕円を定義する外接する四角形の高さ。
- startAngle
- Single
x 軸から時計回りに測定した、扇型部分の開始角度。
- sweepAngle
- Single
startAngle
から時計回りで測定した、startAngle
と扇型部分の終端との間の角度。
例
次のコード例は、Windows フォームで使用するように設計されており、イベント オブジェクトがOnPaint必要PaintEventArgse
です。 このコードでは、グラフィックス パスを作成し、円グラフの図形を追加して、画面にパスを描画します。
private:
void AddPieExample( PaintEventArgs^ e )
{
// Create a pie slice of a circle using the AddPie method.
GraphicsPath^ myPath = gcnew GraphicsPath;
myPath->AddPie( 20, 20, 70, 70, -45, 90 );
// Draw the path to the screen.
Pen^ myPen = gcnew Pen( Color::Black,2.0f );
e->Graphics->DrawPath( myPen, myPath );
}
private void AddPieExample(PaintEventArgs e)
{
// Create a pie slice of a circle using the AddPie method.
GraphicsPath myPath = new GraphicsPath();
myPath.AddPie(20, 20, 70, 70, -45, 90);
// Draw the path to the screen.
Pen myPen = new Pen(Color.Black, 2);
e.Graphics.DrawPath(myPen, myPath);
}
Public Sub AddPieExample(ByVal e As PaintEventArgs)
' Create a pie slice of a circle using the AddPie method.
Dim myPath As New GraphicsPath
myPath.AddPie(20, 20, 70, 70, -45, 90)
' Draw the path to the screen.
Dim myPen As New Pen(Color.Black, 2)
e.Graphics.DrawPath(myPen, myPath)
End Sub
注釈
円形状は、楕円の部分的な輪郭と、部分アウトラインの端点と交差する 2 つの放射状線によって定義されます。 部分アウトラインは で startAngle
始まり (x 軸から時計回りに測定)、 で startAngle
+ sweepAngle
終わります。
適用対象
AddPie(Single, Single, Single, Single, Single, Single)
パスに扇形のアウトラインを追加します。
public:
void AddPie(float x, float y, float width, float height, float startAngle, float sweepAngle);
public void AddPie (float x, float y, float width, float height, float startAngle, float sweepAngle);
member this.AddPie : single * single * single * single * single * single -> unit
Public Sub AddPie (x As Single, y As Single, width As Single, height As Single, startAngle As Single, sweepAngle As Single)
パラメーター
- x
- Single
扇形の描画元となる楕円を定義する外接する四角形の左上隅の x 座標。
- y
- Single
扇形の描画元となる楕円を定義する外接する四角形の左上隅の y 座標。
- width
- Single
扇形の描画元となる楕円を定義する外接する四角形の幅。
- height
- Single
扇形の描画元となる楕円を定義する外接する四角形の高さ。
- startAngle
- Single
x 軸から時計回りに測定した、扇型部分の開始角度。
- sweepAngle
- Single
startAngle
から時計回りで測定した、startAngle
と扇型部分の終端との間の角度。
例
例については、「AddPie(Int32, Int32, Int32, Int32, Single, Single)」を参照してください。
注釈
円形状は、楕円の部分的な輪郭と、部分アウトラインの端点と交差する 2 つの放射状線によって定義されます。 部分アウトラインは で startAngle
始まり (x 軸から時計回りに測定)、 で startAngle
+ sweepAngle
終わります。