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

GraphicsPath.AddRectangles メソッド (RectangleF[])

パス一連の四角形追加します

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

Public Sub AddRectangles ( _
    rects As RectangleF() _
)
Dim instance As GraphicsPath
Dim rects As RectangleF()

instance.AddRectangles(rects)
public void AddRectangles (
    RectangleF[] rects
)
public:
void AddRectangles (
    array<RectangleF>^ rects
)
public void AddRectangles (
    RectangleF[] rects
)
public function AddRectangles (
    rects : RectangleF[]
)

パラメータ

rects

追加する四角形を表す RectangleF 構造体配列

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

GraphicsPath.AddRectangles メソッド

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

名前 説明
GraphicsPath.AddRectangles (Rectangle[]) パス一連の四角形追加します
GraphicsPath.AddRectangles (RectangleF[]) パス一連の四角形追加します
参照参照

関連項目

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

GraphicsPath.AddRectangles メソッド (Rectangle[])

パス一連の四角形追加します

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

Public Sub AddRectangles ( _
    rects As Rectangle() _
)
Dim instance As GraphicsPath
Dim rects As Rectangle()

instance.AddRectangles(rects)
public void AddRectangles (
    Rectangle[] rects
)
public:
void AddRectangles (
    array<Rectangle>^ rects
)
public void AddRectangles (
    Rectangle[] rects
)
public function AddRectangles (
    rects : Rectangle[]
)

パラメータ

rects

追加する四角形を表す Rectangle 構造体配列

使用例使用例

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

Public Sub AddRectanglesExample(ByVal
 e As PaintEventArgs)

    ' Adds a pattern of rectangles to a GraphicsPath object.
    Dim myPath As New GraphicsPath
    Dim pathRects As Rectangle() = {New Rectangle(20,
 20, 100, 200), _
    New Rectangle(40, 40, 120, 220), New Rectangle(60,
 60, 240, 140)}
    myPath.AddRectangles(pathRects)

    ' Draw the path to the screen.
    Dim myPen As New Pen(Color.Black,
 2)
    e.Graphics.DrawPath(myPen, myPath)
End Sub
private void AddRectanglesExample(PaintEventArgs
 e)
{
             
    // Adds a pattern of rectangles to a GraphicsPath object.
    GraphicsPath myPath = new GraphicsPath();
    Rectangle[] pathRects =
             {
                 new Rectangle(20,20,100,200),
                 new Rectangle(40,40,120,220),
                 new Rectangle(60,60,240,140)
             };
    myPath.AddRectangles(pathRects);
             
    // Draw the path to the screen.
    Pen myPen = new Pen(Color.Black, 2);
    e.Graphics.DrawPath(myPen, myPath);
}
private:
   void AddRectanglesExample( PaintEventArgs^ e )
   {
      // Adds a pattern of rectangles to a GraphicsPath object.
      GraphicsPath^ myPath = gcnew GraphicsPath;
      array<Rectangle>^ pathRects = {Rectangle(20,20,100,200),Rectangle(40
,40,120,220),Rectangle(60,60,240,140)};
      myPath->AddRectangles( pathRects );

      // Draw the path to the screen.
      Pen^ myPen = gcnew Pen( Color::Black,2.0f );
      e->Graphics->DrawPath( myPen, myPath );
   }
private void AddRectanglesExample(PaintEventArgs
 e)
{
    // Adds a pattern of rectangles to a GraphicsPath object.
    GraphicsPath myPath = new GraphicsPath();
    Rectangle pathRects[] = { new Rectangle(20, 20, 100, 200),
 
                            new Rectangle(40, 40, 120, 220), 
                            new Rectangle(60, 60, 240, 140) };

    myPath.AddRectangles(pathRects);

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

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


このページでは「.NET Framework クラス ライブラリ リファレンス」からGraphicsPath.AddRectanglesを検索した結果を表示しています。
Weblioに収録されているすべての辞書からGraphicsPath.AddRectanglesを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からGraphicsPath.AddRectangles を検索

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

辞書ショートカット

すべての辞書の索引

「GraphicsPath.AddRectangles」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS