Graphics::GetVisibleClipBounds(RectF*) メソッド (gdiplusgraphics.h)

Graphics::GetVisibleClipBounds メソッドは、この Graphics オブジェクトの可視領域を囲む四角形を取得します。 表示されるクリッピング領域は、この Graphics オブジェクトのクリッピング領域とウィンドウのクリッピング領域の交差部分です。

構文

Status GetVisibleClipBounds(
  RectF *rect
);

パラメーター

rect

表示されているクリッピング領域を囲む四角形を受け取る RectF オブジェクトへのポインター。

戻り値

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

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

解説

次の例では、 Graphics オブジェクトのクリッピング領域を設定します。 次に、表示されているクリッピング領域を囲み、その四角形を塗りつぶす四角形を取得します。

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

   // Set the clipping region.
   graphics.SetClip(RectF(100.0f, 100.0f, 200.0f, 100.0f));

   // Get a bounding rectangle for the clipping region.
   RectF boundRect;
   graphics.GetVisibleClipBounds(&boundRect);

   // Fill the bounding rectangle.
   graphics.FillRectangle(&SolidBrush(Color(255, 0, 0, 0)), boundRect);
}

必要条件

   
Header gdiplusgraphics.h

関連項目

GetClipBounds メソッド

グラフィックス

Graphics::IsVisibleClipEmpty

IsVisible メソッド

RectF