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

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

GraphicsPathIterator.HasCurve メソッド

GraphicsPathIterator に関連付けられているパス曲線含まれているかどうか示します

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

Dim instance As GraphicsPathIterator
Dim returnValue As Boolean

returnValue = instance.HasCurve
public bool HasCurve ()
public:
bool HasCurve ()
public boolean HasCurve ()

戻り値
このメソッドは、現在のサブパスに曲線含まれている場合true返しますそれ以外場合false返します

解説解説
使用例使用例

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

Public Sub HasCurveExample(ByVal
 e As PaintEventArgs)
    Dim myPath As New GraphicsPath
    Dim myPoints As Point() = {New Point(20,
 20), _
        New Point(120, 120), New Point(20,
 120), New Point(20, 20)}
    Dim myRect As New Rectangle(120,
 120, 100, 100)
    myPath.AddLines(myPoints)
    myPath.AddRectangle(myRect)
    myPath.AddEllipse(220, 220, 100, 100)

    ' Create a GraphicsPathIterator for myPath.
    Dim myPathIterator As New
 GraphicsPathIterator(myPath)
    Dim myHasCurve As Boolean
 = myPathIterator.HasCurve()
    MessageBox.Show(myHasCurve.ToString())
End Sub
private void HasCurveExample(PaintEventArgs
 e)
{
             
    // Create a path and add three lines,
    // a rectangle and an ellipse.
    GraphicsPath myPath = new GraphicsPath();
    
    Point[] myPoints = {new Point(20, 20), new
 Point(120, 120), 
        new Point(20, 120),new Point(20, 20)
 }; 

    Rectangle myRect = new Rectangle(120, 120, 100, 100);
    myPath.AddLines(myPoints);
    myPath.AddRectangle(myRect);
    myPath.AddEllipse(220, 220, 100, 100);
             
    // Create a GraphicsPathIterator for myPath.
    GraphicsPathIterator myPathIterator = new
        GraphicsPathIterator(myPath);
             
    // Test for a curve.
    bool myHasCurve = myPathIterator.HasCurve();
             
    // Show the test result.
    MessageBox.Show(myHasCurve.ToString());
}
private:
   void HasCurveExample( PaintEventArgs^ /*e*/ )
   {
      // Create a path and add three lines,
      // a rectangle and an ellipse.
      GraphicsPath^ myPath = gcnew GraphicsPath;
      array<Point>^ myPoints = {Point(20,20),Point(120,120),Point(20,120),Point(20
,20)};
      Rectangle myRect = Rectangle(120,120,100,100);
      myPath->AddLines( myPoints );
      myPath->AddRectangle( myRect );
      myPath->AddEllipse( 220, 220, 100, 100 );

      // Create a GraphicsPathIterator for myPath.
      GraphicsPathIterator^ myPathIterator = gcnew GraphicsPathIterator( myPath );

      // Test for a curve.
      bool myHasCurve = myPathIterator->HasCurve();

      // Show the test result.
      MessageBox::Show( myHasCurve.ToString() );
   }
private void HasCurveExample(PaintEventArgs
 e)
{
    // Create a path and add three lines,
    // a rectangle and an ellipse.
    GraphicsPath myPath = new GraphicsPath();
    Point myPoints[] = { new Point(20, 20), new
 Point(120, 120), 
                        new Point(20, 120), new
 Point(20, 20) };
    Rectangle myRect = new Rectangle(120, 120, 100, 100);

    myPath.AddLines(myPoints);
    myPath.AddRectangle(myRect);
    myPath.AddEllipse(220, 220, 100, 100);

    // Create a GraphicsPathIterator for myPath.
    GraphicsPathIterator myPathIterator = new GraphicsPathIterator(myPath);

    // Test for a curve.
    boolean myHasCurve = myPathIterator.HasCurve();

    // Show the test result.
    MessageBox.Show(System.Convert.ToString(myHasCurve));
} //HasCurveExample
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
GraphicsPathIterator クラス
GraphicsPathIterator メンバ
System.Drawing.Drawing2D 名前空間



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2024 GRAS Group, Inc.RSS