Graphics::IsClipEmpty method (gdiplusgraphics.h)
The Graphics::IsClipEmpty method determines whether the clipping region of this Graphics object is empty.
Syntax
BOOL IsClipEmpty();
Return value
Type: BOOL
If the clipping region of a Graphics object is empty, this method returns TRUE; otherwise, it returns FALSE.
Remarks
If the clipping region of a Graphics object is empty, there is no area left in which to draw. Consequently, nothing will be drawn when the clipping region is empty.
Examples
The following example determines whether the clipping region is empty and, if it isn't, draws a rectangle.
VOID Example_IsClipEmpty(HDC hdc)
{
Graphics graphics(hdc);
// If the clipping region is not empty, draw a rectangle.
if (!graphics.IsClipEmpty())
{
graphics.DrawRectangle(&Pen(Color(255, 0, 0, 0), 3), 0, 0, 100, 100);
}
}
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 |