Export (0) Print
Expand All
Expand Minimize

Graphics.IsVisibleClipEmpty method

Applies to: desktop apps only

The Graphics::IsVisibleClipEmpty method determines whether the visible clipping region of this Graphics object is empty. The visible clipping region is the intersection of the clipping region of this Graphics object and the clipping region of the window.

Syntax

BOOL IsVisibleClipEmpty() const;

Parameters

This method has no parameters.

Return value

Type:

Type: BOOL

If the visible clipping region of this Graphics object is empty, this method returns TRUE; otherwise, it returns FALSE.

Remarks

If the visible clipping region of a Graphics object is empty, there is no area left in which to draw. Consequently, nothing will be drawn when the visible clipping region is empty.

Examples

The following example determines whether the visible clipping region is empty. If it is not empty, it draws a rectangle.


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

   // If the clipping region is not empty, draw a rectangle.
   if (!graphics.IsVisibleClipEmpty())
   {
   graphics.DrawRectangle(&Pen(Color(255, 0, 0, 0), 3), 0, 0, 100, 100);
   }
}

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

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show:
© 2014 Microsoft