GraphicsPath::AddRectangles(constRectF*,INT) メソッド (gdipluspath.h)

GraphicsPath::AddRectangles メソッドは、このパスに四角形のシーケンスを追加します。

構文

Status AddRectangles(
  const RectF *rects,
  INT         count
);

パラメーター

rects

パスに追加される四角形の配列へのポインター。

count

rects 配列内の要素の数を指定する整数。

戻り値

Type:Status

メソッドが成功した場合は、 Status 列挙体の要素である Ok を返します。

メソッドが失敗した場合は、 Status 列挙体の他の要素のいずれかを返します。

解説

次の例では 、GraphicsPath オブジェクト パスを作成し、パスに 2 つの四角形を追加し、パスを描画します。

VOID Example_AddRectangles(HDC hdc)
{
   Graphics graphics(hdc);

   RectF rects[] = {RectF(20.0f, 20.0f, 100.0f, 50.0f),
                    RectF(30.0f, 30.0f, 50.0f, 100.0f)};

   GraphicsPath path;
   path.AddRectangles(rects, 2);

   // Draw the path.
   Pen pen(Color(255, 255, 0, 0));
   graphics.DrawPath(&pen, &path);
}

要件

要件
Header gdipluspath.h

こちらもご覧ください

AddRectangle メソッド

AddRectangles メソッド

領域でのクリッピング

パスの作成および描画

パス グラデーションの作成

Graphicspath

パス

ペン、直線、および四角形

RectF

ペンを使用した直線と四角形の描画