Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Rect.Inflate(const Point&) method

Applies to: desktop apps only

The Rect::Inflate method expands the rectangle by the value of point.X on the left and right edges, and by the value of point.Y on the top and bottom edges.

Syntax

VOID Inflate(
  [in]  const Point& point
);

Parameters

point [in]

Type: const Point&

Reference to a Point object whose X data member specifies the amount to expand the rectangle on the left and right edges, and whose Y data member specifies the amount to expand the rectangle on the top and bottom edges.

Return value

This method does not return a value.

Examples

The following example creates a Rect object, draws the rectangle, inflates the rectangle, and then redraws the rectangle.


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

   Pen pen(Color(255, 0, 0, 0));
   Point point(20, 10);

   Rect rect(100, 100, 80, 40);
   graphics.DrawRectangle(&pen, rect);
   rect.Inflate(point);
   graphics.DrawRectangle(&pen, rect);
}

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplustypes.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Rect
Point
RectF
Using a Pen to Draw Lines and Rectangles
Pens, Lines, and Rectangles

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

Show: