Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Applies to: desktop apps only
The RectF::Inflate method expands the rectangle by dx on the left and right edges, and by dy on the top and bottom edges.
Syntax
VOID Inflate(
[in] REAL dx,
[in] REAL dy
);
Parameters
dx [in]
Type: REALReal number that specifies the amount to expand the rectangle on the left and right edges.
dy [in]
Type: REALReal number that specifies the amount to expand the rectangle on the top and bottom edges.
Return value
This method does not return a value.
Remarks
The x-coordinate of the left edge is decreased by dx, and the x-coordinate of the right edge is increased by dx. The y-coordinate of the top edge is decreased by dy and the y-coordinate of the bottom edge is increased by dy.
Examples
The following example creates a RectF object, draws the rectangle, inflates the rectangle, and then redraws the rectangle.
VOID Example_InflateDxDy(HDC hdc)
{
Graphics graphics(hdc);
Pen pen(Color(255, 0, 0, 0));
// Create and draw a rectangle.
RectF rect(100, 100, 80, 40);
graphics.DrawRectangle(&pen, rect);
// Inflate the rectangle, and then redraw the rectangle.
rect.Inflate(20, 10);
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
Using a Pen to Draw Lines and Rectangles
Send comments about this topic to Microsoft
Build date: 3/6/2012