GraphicsPath.AddClosedCurve メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > GraphicsPath.AddClosedCurve メソッドの意味・解説 

GraphicsPath.AddClosedCurve メソッド (Point[], Single)

パス閉じた曲線追加します曲線配列内の各点を結ぶため、カーディナル スプライン曲線使用します

名前空間: System.Drawing.Drawing2D
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub AddClosedCurve ( _
    points As Point(), _
    tension As Single _
)
Dim instance As GraphicsPath
Dim points As Point()
Dim tension As Single

instance.AddClosedCurve(points, tension)
public void AddClosedCurve (
    Point[] points,
    float tension
)
public:
void AddClosedCurve (
    array<Point>^ points, 
    float tension
)
public void AddClosedCurve (
    Point[] points, 
    float tension
)
public function AddClosedCurve (
    points : Point[], 
    tension : float
)

パラメータ

points

曲線定義する複数の点を表す Point 構造体配列

tension

曲線が点の間で湾曲する度合い指定する 0 ~ 1 の値。0 が最小 (急な曲線) で、1 の場合に最も滑らかな曲線なります

解説解説

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

使用例使用例

次のコード例は、Windows フォームでの使用意図してデザインされており、OnPaint イベント オブジェクトである PaintEventArgse が必要です。このコード次のアクション実行します

テンション0.5使用されます。

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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
GraphicsPath クラス
GraphicsPath メンバ
System.Drawing.Drawing2D 名前空間

GraphicsPath.AddClosedCurve メソッド (PointF[])

パス閉じた曲線追加します曲線配列内の各点を結ぶため、カーディナル スプライン曲線使用します

名前空間: System.Drawing.Drawing2D
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub AddClosedCurve ( _
    points As PointF() _
)
Dim instance As GraphicsPath
Dim points As PointF()

instance.AddClosedCurve(points)
public void AddClosedCurve (
    PointF[] points
)
public:
void AddClosedCurve (
    array<PointF>^ points
)
public void AddClosedCurve (
    PointF[] points
)
public function AddClosedCurve (
    points : PointF[]
)

パラメータ

points

曲線定義する複数の点を表す PointF 構造体配列

解説解説

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

使用例使用例
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
GraphicsPath クラス
GraphicsPath メンバ
System.Drawing.Drawing2D 名前空間

GraphicsPath.AddClosedCurve メソッド (Point[])

パス閉じた曲線追加します曲線配列内の各点を結ぶため、カーディナル スプライン曲線使用します

名前空間: System.Drawing.Drawing2D
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub AddClosedCurve ( _
    points As Point() _
)
Dim instance As GraphicsPath
Dim points As Point()

instance.AddClosedCurve(points)
public void AddClosedCurve (
    Point[] points
)
public:
void AddClosedCurve (
    array<Point>^ points
)
public void AddClosedCurve (
    Point[] points
)
public function AddClosedCurve (
    points : Point[]
)

パラメータ

points

曲線定義する複数の点を表す Point 構造体配列

解説解説

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

使用例使用例
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
GraphicsPath クラス
GraphicsPath メンバ
System.Drawing.Drawing2D 名前空間

GraphicsPath.AddClosedCurve メソッド


GraphicsPath.AddClosedCurve メソッド (PointF[], Single)

パス閉じた曲線追加します曲線配列内の各点を結ぶため、カーディナル スプライン曲線使用します

名前空間: System.Drawing.Drawing2D
アセンブリ: System.Drawing (system.drawing.dll 内)
構文構文

Public Sub AddClosedCurve ( _
    points As PointF(), _
    tension As Single _
)
Dim instance As GraphicsPath
Dim points As PointF()
Dim tension As Single

instance.AddClosedCurve(points, tension)
public void AddClosedCurve (
    PointF[] points,
    float tension
)
public:
void AddClosedCurve (
    array<PointF>^ points, 
    float tension
)
public void AddClosedCurve (
    PointF[] points, 
    float tension
)
public function AddClosedCurve (
    points : PointF[], 
    tension : float
)

パラメータ

points

曲線定義する複数の点を表す PointF 構造体配列

tension

曲線が点の間で湾曲する度合い指定する 0 ~ 1 の値。0 が最小 (急な曲線) で、1 の場合に最も滑らかな曲線なります

解説解説

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

使用例使用例
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
GraphicsPath クラス
GraphicsPath メンバ
System.Drawing.Drawing2D 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

GraphicsPath.AddClosedCurve メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



GraphicsPath.AddClosedCurve メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS