GraphicsPath.AddRectangleとは? わかりやすく解説

GraphicsPath.AddRectangle メソッド (RectangleF)

パス四角形追加します

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

Public Sub AddRectangle ( _
    rect As RectangleF _
)
Dim instance As GraphicsPath
Dim rect As RectangleF

instance.AddRectangle(rect)
public void AddRectangle (
    RectangleF rect
)
public:
void AddRectangle (
    RectangleF rect
)
public void AddRectangle (
    RectangleF rect
)
public function AddRectangle (
    rect : RectangleF
)

パラメータ

rect

追加する四角形を表す RectangleF。

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

GraphicsPath.AddRectangle メソッド (Rectangle)

パス四角形追加します

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

Public Sub AddRectangle ( _
    rect As Rectangle _
)
Dim instance As GraphicsPath
Dim rect As Rectangle

instance.AddRectangle(rect)
public void AddRectangle (
    Rectangle rect
)
public:
void AddRectangle (
    Rectangle rect
)
public void AddRectangle (
    Rectangle rect
)
public function AddRectangle (
    rect : Rectangle
)

パラメータ

rect

追加する四角形を表す Rectangle

使用例使用例

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

Public Sub AddRectangleExample(ByVal
 e As PaintEventArgs)

    ' Create a GraphicsPath object and add a rectangle to it.
    Dim myPath As New GraphicsPath
    Dim pathRect As New
 Rectangle(20, 20, 100, 200)
    myPath.AddRectangle(pathRect)

    ' Draw the path to the screen.
    Dim myPen As New Pen(Color.Black,
 2)
    e.Graphics.DrawPath(myPen, myPath)
End Sub
private void AddRectangleExample(PaintEventArgs
 e)
{
             
    // Create a GraphicsPath object and add a rectangle to it.
    GraphicsPath myPath = new GraphicsPath();
    Rectangle pathRect = new Rectangle(20, 20, 100, 200);
    myPath.AddRectangle(pathRect);
             
    // Draw the path to the screen.
    Pen myPen = new Pen(Color.Black, 2);
    e.Graphics.DrawPath(myPen, myPath);
}
private:
   void AddRectangleExample( PaintEventArgs^ e )
   {
      // Create a GraphicsPath object and add a rectangle to it.
      GraphicsPath^ myPath = gcnew GraphicsPath;
      Rectangle pathRect = Rectangle(20,20,100,200);
      myPath->AddRectangle( pathRect );

      // Draw the path to the screen.
      Pen^ myPen = gcnew Pen( Color::Black,2.0f );
      e->Graphics->DrawPath( myPen, myPath );
   }
private void AddRectangleExample(PaintEventArgs
 e)
{
    // Create a GraphicsPath object and add a rectangle to it.
    GraphicsPath myPath = new GraphicsPath();
    Rectangle pathRect = new Rectangle(20, 20, 100, 200);

    myPath.AddRectangle(pathRect);

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

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

GraphicsPath.AddRectangle メソッド

パス四角形追加します
オーバーロードの一覧オーバーロードの一覧

名前 説明
GraphicsPath.AddRectangle (Rectangle) パス四角形追加します
GraphicsPath.AddRectangle (RectangleF) パス四角形追加します
参照参照

関連項目

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



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

辞書ショートカット

すべての辞書の索引

「GraphicsPath.AddRectangle」の関連用語

GraphicsPath.AddRectangleのお隣キーワード
検索ランキング

   

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



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

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

©2025 GRAS Group, Inc.RSS