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

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

GraphicsPath.AddBeziers メソッド

接続され3 次ベジエ曲線シーケンス現在の図形追加します
オーバーロードの一覧オーバーロードの一覧

参照参照

関連項目

GraphicsPath クラス
GraphicsPath メンバ
System.Drawing.Drawing2D 名前空間

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

接続され3 次ベジエ曲線シーケンス現在の図形追加します

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

Public Sub AddBeziers ( _
    ParamArray points As Point() _
)
Dim instance As GraphicsPath
Dim points As Point()

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

パラメータ

points

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

解説解説

points パラメータでは、接続され曲線終了点と制御点の配列指定されます。points 配列では、最初曲線は、2 番目と 3 番目の点を制御点として使用して最初の点から 4 番目の点まで生成されます。シーケンス内のこれに続く曲線には、前の曲線終了点以外にあと 3 つの点が必要です。シーケンス次の 2 つの点は制御点で、3 番目は追加された曲線の終了点になります

図形中に前回描画され直線曲線線分がある場合、前の線分終了点と 3 次曲線開始点を結ぶ線が追加されます。

使用例使用例

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

Public Sub AddBeziersExample(ByVal
 e As PaintEventArgs)

    ' Adds two Bezier curves.
    Dim myArray As Point() = {New Point(20,
 100), New Point(40, 75), _
    New Point(60, 125), New Point(80, 100),
 New Point(100, 50), _
    New Point(120, 150), New Point(140, 100)}
    Dim myPath As New GraphicsPath
    myPath.AddBeziers(myArray)
    Dim myPen As New Pen(Color.Black,
 2)
    e.Graphics.DrawPath(myPen, myPath)
End Sub
private void AddBeziersExample(PaintEventArgs
 e)
{
             
    // Adds two Bezier curves.
    Point[] myArray =
             {
                 new Point(20, 100),
                 new Point(40, 75),
                 new Point(60, 125),
                 new Point(80, 100),
                 new Point(100, 50),
                 new Point(120, 150),
                 new Point(140, 100)
             };
             
    // Create the path and add the curves.
    GraphicsPath myPath = new GraphicsPath();
    myPath.AddBeziers(myArray);
             
    // Draw the path to the screen.
    Pen myPen = new Pen(Color.Black, 2);
    e.Graphics.DrawPath(myPen, myPath);
}
private:
   void AddBeziersExample( PaintEventArgs^ e )
   {
      // Adds two Bezier curves.
      array<Point>^ myArray = {Point(20,100),Point(40,75),Point(60,125),Point(80
,100),Point(100,50),Point(120,150),Point(140,100)};

      // Create the path and add the curves.
      GraphicsPath^ myPath = gcnew GraphicsPath;
      myPath->AddBeziers( myArray );

      // Draw the path to the screen.
      Pen^ myPen = gcnew Pen( Color::Black,2.0f );
      e->Graphics->DrawPath( myPen, myPath );
   }
private void AddBeziersExample(PaintEventArgs
 e)
{
    // Adds two Bezier curves.
    Point myArray[] = { new Point(20, 100), new
 Point(40, 75), 
                        new Point(60, 125), new
 Point(80, 100),
                        new Point(100, 50), 
                        new Point(120, 150), new
 Point(140, 100) };

    // Create the path and add the curves.
    GraphicsPath myPath = new GraphicsPath();

    myPath.AddBeziers(myArray);

    // Draw the path to the screen.
    Pen myPen = new Pen(Color.get_Black(), 2);

    e.get_Graphics().DrawPath(myPen, myPath);
} //AddBeziersExample
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
GraphicsPath クラス
GraphicsPath メンバ
System.Drawing.Drawing2D 名前空間

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

接続され3 次ベジエ曲線シーケンス現在の図形追加します

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

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

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

パラメータ

points

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

解説解説

points パラメータでは、接続され曲線終了点と制御点の配列指定されます。points 配列では、最初曲線は、2 番目と 3 番目の点を制御点として使用して最初の点から 4 番目の点まで生成されます。シーケンス内のこれに続く曲線には、前の曲線終了点以外にあと 3 つの点が必要です。シーケンス次の 2 つの点は制御点で、3 番目は追加された曲線の終了点になります

図形中に前回描画され直線曲線線分がある場合、前の線分終了点と 3 次曲線開始点を結ぶ線が追加されます。

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



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2024 GRAS Group, Inc.RSS