GraphicsPath.AddClosedCurve メソッド (Point[], Single)
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim instance As GraphicsPath Dim points As Point() Dim tension As Single instance.AddClosedCurve(points, tension)

必要に応じて、元の点を維持する必要があります。元の点は内部で 3 次ベジエ制御点に変換されるため、元の点を返す機構はありません。points 配列内の最初の点と最後の点が同じではない場合、曲線はこれらの 2 つの点を結ぶことによって閉じられます。

次のコード例は、Windows フォームでの使用を意図してデザインされており、OnPaint イベント オブジェクトである PaintEventArgse が必要です。このコードは次のアクションを実行します。
Public Sub AddClosedCurveExample(ByVal e As PaintEventArgs) ' Creates a symetrical, closed curve. Dim myArray As Point() = {New Point(20, 100), New Point(40, 150), _ New Point(60, 125), New Point(40, 100), New Point(60, 75), _ New Point(40, 50)} Dim myPath As New GraphicsPath myPath.AddClosedCurve(myArray, 0.5F) Dim myPen As New Pen(Color.Black, 2) e.Graphics.DrawPath(myPen, myPath) End Sub
private void AddClosedCurveExample(PaintEventArgs e) { // Creates a symetrical, closed curve. Point[] myArray = { new Point(20,100), new Point(40,150), new Point(60,125), new Point(40,100), new Point(60,75), new Point(40,50) }; // Create a new path and add curve. GraphicsPath myPath = new GraphicsPath(); myPath.AddClosedCurve(myArray,.5f); Pen myPen = new Pen(Color.Black, 2); // Draw the path to screen. e.Graphics.DrawPath(myPen, myPath); }
private: void AddClosedCurveExample( PaintEventArgs^ e ) { // Creates a symetrical, closed curve. array<Point>^ myArray = {Point(20,100),Point(40,150),Point(60,125),Point(40 ,100),Point(60,75),Point(40,50)}; // Create a new path and add curve. GraphicsPath^ myPath = gcnew GraphicsPath; myPath->AddClosedCurve( myArray, .5f ); Pen^ myPen = gcnew Pen( Color::Black,2.0f ); // Draw the path to screen. e->Graphics->DrawPath( myPen, myPath ); }
private void AddClosedCurveExample(PaintEventArgs e) { // Creates a symetrical, closed curve. Point myArray[] = { new Point(20, 100), new Point(40, 150), new Point(60, 125), new Point(40, 100), new Point(60, 75), new Point(40, 50) }; // Create a new path and add curve. GraphicsPath myPath = new GraphicsPath(); myPath.AddClosedCurve(myArray, 0.5F); Pen myPen = new Pen(Color.get_Black(), 2); // Draw the path to screen. e.get_Graphics().DrawPath(myPen, myPath); } //AddClosedCurveExample

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


GraphicsPath.AddClosedCurve メソッド (PointF[])
アセンブリ: System.Drawing (system.drawing.dll 内)


必要に応じて、元の点を維持する必要があります。元の点は内部で 3 次ベジエ制御点に変換されるため、元の点を返す機構はありません。points 配列内の最初の点と最後の点が同じではない場合、曲線はこれらの 2 つの点を結ぶことによって閉じられます。このメソッドにはテンション値を設定できません。既定で 0.5 に相当する値に設定されます。


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


GraphicsPath.AddClosedCurve メソッド (Point[])
アセンブリ: System.Drawing (system.drawing.dll 内)


必要に応じて、元の点を維持する必要があります。元の点は内部で 3 次ベジエ制御点に変換されるため、元の点を返す機構はありません。points 配列内の最初の点と最後の点が同じではない場合、曲線はこれらの 2 つの点を結ぶことによって閉じられます。このメソッドにはテンション値を設定できません。既定で 0.5 に相当する値に設定されます。


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


GraphicsPath.AddClosedCurve メソッド

名前 | 説明 |
---|---|
GraphicsPath.AddClosedCurve (Point[]) | パスに閉じた曲線を追加します。曲線は配列内の各点を結ぶため、カーディナル スプライン曲線を使用します。 |
GraphicsPath.AddClosedCurve (PointF[]) | パスに閉じた曲線を追加します。曲線は配列内の各点を結ぶため、カーディナル スプライン曲線を使用します。 |
GraphicsPath.AddClosedCurve (Point[], Single) | パスに閉じた曲線を追加します。曲線は配列内の各点を結ぶため、カーディナル スプライン曲線を使用します。 |
GraphicsPath.AddClosedCurve (PointF[], Single) | パスに閉じた曲線を追加します。曲線は配列内の各点を結ぶため、カーディナル スプライン曲線を使用します。 |

GraphicsPath.AddClosedCurve メソッド (PointF[], Single)
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim instance As GraphicsPath Dim points As PointF() Dim tension As Single instance.AddClosedCurve(points, tension)

必要に応じて、元の点を維持する必要があります。元の点は内部で 3 次ベジエ制御点に変換されるため、元の点を返す機構はありません。points 配列内の最初の点と最後の点が同じではない場合、曲線はこれらの 2 つの点を結ぶことによって閉じられます。


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- GraphicsPath.AddClosedCurveのページへのリンク