Graphics::ResetClip method (gdiplusgraphics.h)
The Graphics::ResetClip method sets the clipping region of this Graphics object to an infinite region.
Syntax
Status ResetClip();
Return value
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.
Remarks
If the clipping region of a Graphics object is infinite, then items drawn by that Graphics object will not be clipped.
Examples
The following example creates a Graphics object and sets its clipping region to a rectangle. The code fills two ellipses that intersect the rectangular clipping region. The first ellipse is clipped, but the second ellipse is not clipped because it is filled after a call to Graphics::ResetClip.
VOID Example_ResetClip(HDC hdc)
{
Graphics graphics(hdc);
// Set the clipping region, and draw its outline.
graphics.SetClip(Rect(100, 50, 200, 120));
Pen blackPen(Color(255, 0, 0, 0), 2.0f);
graphics.DrawRectangle(&blackPen, 100, 50, 200, 120);
// Fill a clipped ellipse in red.
SolidBrush redBrush(Color(255, 255, 0, 0));
graphics.FillEllipse(&redBrush, 80, 40, 100, 70);
// Reset the clipping region.
graphics.ResetClip();
// Fill an unclipped ellipse with blue.
SolidBrush blueBrush(Color(255, 0, 0, 255));
graphics.FillEllipse(&blueBrush, 160, 150, 100, 60);
}
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP, Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | gdiplusgraphics.h (include Gdiplus.h) |
Library | Gdiplus.lib |
DLL | Gdiplus.dll |