Share via


Graphics::FillRegion メソッド (gdiplusgraphics.h)

Graphics::FillRegion メソッドは、ブラシを使用して指定した領域を塗りつぶします。

構文

Status FillRegion(
  [in] const Brush  *brush,
  [in] const Region *region
);

パラメーター

[in] brush

種類: const Brush*

領域の描画に使用されるブラシへのポインター。

[in] region

型: const Region*

塗りつぶす領域へのポインター。

戻り値

種類: 状態

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

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

注釈

領域は一連のピクセルを表すので、ピクセルは領域の完全な内側または完全な外側と見なされます。 その結果、 Graphics::FillRegion は領域の端にアンチエイリアスを適用しません。

次の例では、四角形から領域を作成し、その領域を塗りつぶします。

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

   // Create a SolidBrush object.
   SolidBrush blackBrush(Color(255, 0, 0, 0));

   // Create a Region object from a rectangle.
   Region ellipseRegion(Rect(0, 0, 200, 100));

   // Fill the region.
   graphics.FillRegion(&blackBrush, &ellipseRegion);
}

要件

要件
サポートされている最小のクライアント Windows XP、Windows 2000 Professional [デスクトップ アプリのみ]
サポートされている最小のサーバー Windows 2000 Server [デスクトップ アプリのみ]
対象プラットフォーム Windows
ヘッダー gdiplusgraphics.h (Gdiplus.h を含む)
Library Gdiplus.lib
[DLL] Gdiplus.dll

こちらもご覧ください

Color

グラフィックス

ペン

リージョン

リージョン

状態