RectF::IsEmptyArea method (gdiplustypes.h)

The RectF::IsEmptyArea method determines whether this rectangle is empty.

Syntax

BOOL IsEmptyArea();

Return value

Type: BOOL

If the rectangle is empty, this method returns TRUE; otherwise, it returns FALSE.

Remarks

A rectangle is defined as empty if either the width or the height is zero or less.

Examples

The following example creates a RectF object, inflates the dimensions of the rectangle, and determines whether the rectangle is empty.

VOID Example_IsEmptyArea(HDC hdc)
{
   Graphics graphics(hdc);
   RectF rect(50, 50, 200, 100);
   rect.Inflate(0, -120);

   if(rect.IsEmptyArea())

   // The rectangle does not enclose any area.
}

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 gdiplustypes.h (include Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

See also

Inflate Methods

Pens, Lines, and Rectangles

Rect

RectF

Using a Pen to Draw Lines and Rectangles