Graphics::ExcludeClip(constRectF&) メソッド (gdiplusgraphics.h)

Graphics::ExcludeClip メソッドは、指定した四角形と交差しない領域にクリッピング領域を更新します。

構文

Status ExcludeClip(
  const RectF & rect
);

パラメーター

rect

クリッピング領域を更新するために使用する四角形への参照。

戻り値

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

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

解説

次の例では、四角形を使用してクリッピング領域を更新し、更新されたクリッピング領域を示す四角形を描画します。

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

   // Create a RectF object, and set the clipping region to its exclusion.
   RectF excludeRect(100.0f, 100.0f, 200.0f, 200.0f);
   graphics.ExcludeClip(excludeRect);

   // Fill a rectangle to demonstrate the clipping region.
   graphics.FillRectangle(&SolidBrush((255, 0, 0, 255)), 0, 0, 600, 600);
}

要件

   
Header gdiplusgraphics.h

こちらもご覧ください

グラフィックス

Rect

StringFormat