Graphics.DrawClosedCurve メソッド (Pen, PointF[])
アセンブリ: System.Drawing (system.drawing.dll 内)

Dim instance As Graphics Dim pen As Pen Dim points As PointF() instance.DrawClosedCurve(pen, points)


このメソッドは、配列の各点を通過する閉じたカーディナル スプラインを描画します。最後の点と最初の点が一致しない場合は、曲線を閉じるために最後の点と最初の点を結ぶ曲線の線分が追加されます。

次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
このメソッドは、既定のテンションである 0.5 を使用します。
Public Sub DrawClosedCurvePointF(ByVal e As PaintEventArgs) ' Create pens. Dim redPen As New Pen(Color.Red, 3) Dim greenPen As New Pen(Color.Green, 3) ' Create points that define curve. Dim point1 As New PointF(50.0F, 50.0F) Dim point2 As New PointF(100.0F, 25.0F) Dim point3 As New PointF(200.0F, 5.0F) Dim point4 As New PointF(250.0F, 50.0F) Dim point5 As New PointF(300.0F, 100.0F) Dim point6 As New PointF(350.0F, 200.0F) Dim point7 As New PointF(250.0F, 250.0F) Dim curvePoints As PointF() = {point1, point2, point3, point4, _ point5, point6, point7} ' Draw lines between original points to screen. e.Graphics.DrawLines(redPen, curvePoints) ' Draw closed curve to screen. e.Graphics.DrawClosedCurve(greenPen, curvePoints) End Sub
public void DrawClosedCurvePointF(PaintEventArgs e) { // Create pens. Pen redPen = new Pen(Color.Red, 3); Pen greenPen = new Pen(Color.Green, 3); // Create points that define curve. PointF point1 = new PointF(50.0F, 50.0F); PointF point2 = new PointF(100.0F, 25.0F); PointF point3 = new PointF(200.0F, 5.0F); PointF point4 = new PointF(250.0F, 50.0F); PointF point5 = new PointF(300.0F, 100.0F); PointF point6 = new PointF(350.0F, 200.0F); PointF point7 = new PointF(250.0F, 250.0F); PointF[] curvePoints = {point1, point2, point3, point4, point5, point6, point7}; // Draw lines between original points to screen. e.Graphics.DrawLines(redPen, curvePoints); // Draw closed curve to screen. e.Graphics.DrawClosedCurve(greenPen, curvePoints); }
public: void DrawClosedCurvePointF( PaintEventArgs^ e ) { // Create pens. Pen^ redPen = gcnew Pen( Color::Red,3.0f ); Pen^ greenPen = gcnew Pen( Color::Green,3.0f ); // Create points that define curve. PointF point1 = PointF(50.0F,50.0F); PointF point2 = PointF(100.0F,25.0F); PointF point3 = PointF(200.0F,5.0F); PointF point4 = PointF(250.0F,50.0F); PointF point5 = PointF(300.0F,100.0F); PointF point6 = PointF(350.0F,200.0F); PointF point7 = PointF(250.0F,250.0F); array<PointF>^ curvePoints = {point1,point2,point3,point4,point5,point6 ,point7}; // Draw lines between original points to screen. e->Graphics->DrawLines( redPen, curvePoints ); // Draw closed curve to screen. e->Graphics->DrawClosedCurve( greenPen, curvePoints ); }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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

Public Sub DrawClosedCurve ( _ pen As Pen, _ points As Point(), _ tension As Single, _ fillmode As FillMode _ )
Dim instance As Graphics Dim pen As Pen Dim points As Point() Dim tension As Single Dim fillmode As FillMode instance.DrawClosedCurve(pen, points, tension, fillmode)
public function DrawClosedCurve ( pen : Pen, points : Point[], tension : float, fillmode : FillMode )


このメソッドは、配列の各点を通過する閉じたカーディナル スプラインを描画します。最後の点と最初の点が一致しない場合は、曲線を閉じるために最後の点と最初の点を結ぶ曲線の線分が追加されます。
点の配列には、4 つ以上の Point 構造体を含める必要があります。
tension パラメータは、スプラインの形を決定します。tension パラメータの値が 0.0F の場合、このメソッドは点をつなぐ直線セグメントを描画します。通常、tension パラメータは 1.0F 以下です。値が 1.0F を超える場合は、予期しない結果になります。

次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
このメソッドは、1.0 のテンションを使用し、塗りつぶしモードを FillMode.Alternate に設定します。
Public Sub DrawClosedCurvePointTension(ByVal e As PaintEventArgs) ' Create pens. Dim redPen As New Pen(Color.Red, 3) Dim greenPen As New Pen(Color.Green, 3) ' Create points that define curve. Dim point1 As New Point(50, 50) Dim point2 As New Point(100, 25) Dim point3 As New Point(200, 5) Dim point4 As New Point(250, 50) Dim point5 As New Point(300, 100) Dim point6 As New Point(350, 200) Dim point7 As New Point(250, 250) Dim curvePoints As Point() = {point1, point2, point3, point4, _ point5, point6, point7} ' Draw lines between original points to screen. e.Graphics.DrawLines(redPen, curvePoints) ' Create tension and fill mode. Dim tension As Single = 1.0F Dim aFillMode As FillMode = FillMode.Alternate ' Draw closed curve to screen. e.Graphics.DrawClosedCurve(greenPen, curvePoints, tension, _ aFillMode) End Sub
public void DrawClosedCurvePointTension(PaintEventArgs e) { // Create pens. Pen redPen = new Pen(Color.Red, 3); Pen greenPen = new Pen(Color.Green, 3); // Create points that define curve. Point point1 = new Point(50, 50); Point point2 = new Point(100, 25); Point point3 = new Point(200, 5); Point point4 = new Point(250, 50); Point point5 = new Point(300, 100); Point point6 = new Point(350, 200); Point point7 = new Point(250, 250); Point[] curvePoints = {point1, point2, point3, point4, point5, point6, point7}; // Draw lines between original points to screen. e.Graphics.DrawLines(redPen, curvePoints); // Create tension and fill mode. float tension = 1.0F; FillMode aFillMode = FillMode.Alternate; // Draw closed curve to screen. e.Graphics.DrawClosedCurve(greenPen, curvePoints, tension, aFillMode); }
public: void DrawClosedCurvePointTension( PaintEventArgs^ e ) { // Create pens. Pen^ redPen = gcnew Pen( Color::Red,3.0f ); Pen^ greenPen = gcnew Pen( Color::Green,3.0f ); // Create points that define curve. Point point1 = Point(50,50); Point point2 = Point(100,25); Point point3 = Point(200,5); Point point4 = Point(250,50); Point point5 = Point(300,100); Point point6 = Point(350,200); Point point7 = Point(250,250); array<Point>^ curvePoints = {point1,point2,point3,point4,point5,point6 ,point7}; // Draw lines between original points to screen. e->Graphics->DrawLines( redPen, curvePoints ); // Create tension and fill mode. float tension = 1.0F; FillMode aFillMode = FillMode::Alternate; // Draw closed curve to screen. e->Graphics->DrawClosedCurve( greenPen, curvePoints, tension, aFillMode ); }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Graphics.DrawClosedCurve メソッド

名前 | 説明 |
---|---|
Graphics.DrawClosedCurve (Pen, Point[]) | Point 構造体の配列で定義された、閉じたカーディナル スプラインを描画します。 |
Graphics.DrawClosedCurve (Pen, PointF[]) | PointF 構造体の配列で定義された、閉じたカーディナル スプラインを描画します。 |
Graphics.DrawClosedCurve (Pen, Point[], Single, FillMode) | 指定したテンションを使用して、Point 構造体の配列で定義された、閉じたカーディナル スプラインを描画します。 |
Graphics.DrawClosedCurve (Pen, PointF[], Single, FillMode) | 指定したテンションを使用して、PointF 構造体の配列で定義された、閉じたカーディナル スプラインを描画します。 |

Graphics.DrawClosedCurve メソッド (Pen, Point[])
アセンブリ: System.Drawing (system.drawing.dll 内)



このメソッドは、配列の各点を通過する閉じたカーディナル スプラインを描画します。最後の点と最初の点が一致しない場合は、図形を閉じるために最後の点と最初の点を結ぶ曲線の線分が追加されます。

次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
このメソッドは、既定のテンションである 0.5 を使用します。
Public Sub DrawClosedCurvePoint(ByVal e As PaintEventArgs) ' Create pens. Dim redPen As New Pen(Color.Red, 3) Dim greenPen As New Pen(Color.Green, 3) ' Create points that define curve. Dim point1 As New Point(50, 50) Dim point2 As New Point(100, 25) Dim point3 As New Point(200, 5) Dim point4 As New Point(250, 50) Dim point5 As New Point(300, 100) Dim point6 As New Point(350, 200) Dim point7 As New Point(250, 250) Dim curvePoints As Point() = {point1, point2, point3, point4, _ point5, point6, point7} ' Draw lines between original points to screen. e.Graphics.DrawLines(redPen, curvePoints) ' Draw closed curve to screen. e.Graphics.DrawClosedCurve(greenPen, curvePoints) End Sub
public void DrawClosedCurvePoint(PaintEventArgs e) { // Create pens. Pen redPen = new Pen(Color.Red, 3); Pen greenPen = new Pen(Color.Green, 3); // Create points that define curve. Point point1 = new Point(50, 50); Point point2 = new Point(100, 25); Point point3 = new Point(200, 5); Point point4 = new Point(250, 50); Point point5 = new Point(300, 100); Point point6 = new Point(350, 200); Point point7 = new Point(250, 250); Point[] curvePoints = { point1, point2, point3, point4, point5, point6, point7 }; // Draw lines between original points to screen. e.Graphics.DrawLines(redPen, curvePoints); // Draw closed curve to screen. e.Graphics.DrawClosedCurve(greenPen, curvePoints); }
public: void DrawClosedCurvePoint( PaintEventArgs^ e ) { // Create pens. Pen^ redPen = gcnew Pen( Color::Red,3.0f ); Pen^ greenPen = gcnew Pen( Color::Green,3.0f ); // Create points that define curve. Point point1 = Point(50,50); Point point2 = Point(100,25); Point point3 = Point(200,5); Point point4 = Point(250,50); Point point5 = Point(300,100); Point point6 = Point(350,200); Point point7 = Point(250,250); array<Point>^ curvePoints = {point1,point2,point3,point4,point5,point6 ,point7}; // Draw lines between original points to screen. e->Graphics->DrawLines( redPen, curvePoints ); // Draw closed curve to screen. e->Graphics->DrawClosedCurve( greenPen, curvePoints ); }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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

Public Sub DrawClosedCurve ( _ pen As Pen, _ points As PointF(), _ tension As Single, _ fillmode As FillMode _ )
Dim instance As Graphics Dim pen As Pen Dim points As PointF() Dim tension As Single Dim fillmode As FillMode instance.DrawClosedCurve(pen, points, tension, fillmode)
public function DrawClosedCurve ( pen : Pen, points : PointF[], tension : float, fillmode : FillMode )


このメソッドは、配列の各点を通過する閉じたカーディナル スプラインを描画します。最後の点と最初の点が一致しない場合は、曲線を閉じるために最後の点と最初の点を結ぶ曲線の線分が追加されます。
点の配列には、4 つ以上の PointF 構造体を含める必要があります。
tension パラメータは、スプラインの形を決定します。tension パラメータの値が 0.0F の場合、このメソッドは点をつなぐ直線セグメントを描画します。通常、tension パラメータは 1.0F 以下です。値が 1.0F を超える場合は、予期しない結果になります。

次の例は、Windows フォームでの使用を意図してデザインされており、Paint イベント ハンドラのパラメータである PaintEventArgse が必要です。このコードは次のアクションを実行します。
このメソッドは、1.0 のテンションを使用し、塗りつぶしモードを FillMode.Alternate に設定します。
Public Sub DrawClosedCurvePointFTension(ByVal e As PaintEventArgs) ' Create pens. Dim redPen As New Pen(Color.Red, 3) Dim greenPen As New Pen(Color.Green, 3) ' Create points that define curve. Dim point1 As New PointF(50.0F, 50.0F) Dim point2 As New PointF(100.0F, 25.0F) Dim point3 As New PointF(200.0F, 5.0F) Dim point4 As New PointF(250.0F, 50.0F) Dim point5 As New PointF(300.0F, 100.0F) Dim point6 As New PointF(350.0F, 200.0F) Dim point7 As New PointF(250.0F, 250.0F) Dim curvePoints As PointF() = {point1, point2, point3, point4, _ point5, point6, point7} ' Draw lines between original points to screen. e.Graphics.DrawLines(redPen, curvePoints) ' Create tension and fill mode. Dim tension As Single = 1.0F Dim aFillMode As FillMode = FillMode.Alternate ' Draw closed curve to screen. e.Graphics.DrawClosedCurve(greenPen, curvePoints, tension, _ aFillMode) End Sub
public void DrawClosedCurvePointFTension(PaintEventArgs e) { // Create pens. Pen redPen = new Pen(Color.Red, 3); Pen greenPen = new Pen(Color.Green, 3); // Create points that define curve. PointF point1 = new PointF(50.0F, 50.0F); PointF point2 = new PointF(100.0F, 25.0F); PointF point3 = new PointF(200.0F, 5.0F); PointF point4 = new PointF(250.0F, 50.0F); PointF point5 = new PointF(300.0F, 100.0F); PointF point6 = new PointF(350.0F, 200.0F); PointF point7 = new PointF(250.0F, 250.0F); PointF[] curvePoints = {point1, point2, point3, point4, point5, point6, point7}; // Draw lines between original points to screen. e.Graphics.DrawLines(redPen, curvePoints); // Create tension and fill mode. float tension = 1.0F; FillMode aFillMode = FillMode.Alternate; // Draw closed curve to screen. e.Graphics.DrawClosedCurve(greenPen, curvePoints, tension, aFillMode); }
public: void DrawClosedCurvePointFTension( PaintEventArgs^ e ) { // Create pens. Pen^ redPen = gcnew Pen( Color::Red,3.0f ); Pen^ greenPen = gcnew Pen( Color::Green,3.0f ); // Create points that define curve. PointF point1 = PointF(50.0F,50.0F); PointF point2 = PointF(100.0F,25.0F); PointF point3 = PointF(200.0F,5.0F); PointF point4 = PointF(250.0F,50.0F); PointF point5 = PointF(300.0F,100.0F); PointF point6 = PointF(350.0F,200.0F); PointF point7 = PointF(250.0F,250.0F); array<PointF>^ curvePoints = {point1,point2,point3,point4,point5,point6 ,point7}; // Draw lines between original points to screen. e->Graphics->DrawLines( redPen, curvePoints ); // Create tension and fill mode. float tension = 1.0F; FillMode aFillMode = FillMode::Alternate; // Draw closed curve to screen. e->Graphics->DrawClosedCurve( greenPen, curvePoints, tension, aFillMode ); }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からGraphics.DrawClosedCurveを検索する場合は、下記のリンクをクリックしてください。

- Graphics.DrawClosedCurveのページへのリンク