Graphics::ExcludeClip(constRectF&) method (gdiplusgraphics.h)

The Graphics::ExcludeClip method updates the clipping region to the portion of itself that does not intersect the specified rectangle.

Syntax

Status ExcludeClip(
  const RectF & rect
);

Parameters

rect

Reference to a rectangle to use to update the clipping region.

Return value

If the method succeeds, it returns Ok, which is an element of the Status enumeration.

If the method fails, it returns one of the other elements of the Status enumeration.

Remarks

Examples

The following example uses a rectangle to update a clipping region and then draws a rectangle that demonstrates the updated clipping region.

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);
}

Requirements

Requirement Value
Header gdiplusgraphics.h

See also

Graphics

Rect

StringFormat