Graphics.ExcludeClip(const RectF) method

Applies to: desktop apps only

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

Syntax

Status ExcludeClip(
  [in, ref]  const RectF &rect
);

Parameters

  • rect [in, ref]
    Type: const RectF

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

Return value

Type:

Type: Status****

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.

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

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplusgraphics.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Graphics

Rect

Status

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012