xtd 0.2.0
Loading...
Searching...
No Matches

◆ inflate() [4/4]

static rectangle xtd::drawing::rectangle::inflate ( const rectangle rect,
const drawing::size sz 
)
staticnoexcept

Creates and returns an enlarged copy of the specified xtd::drawing::rectangle structure. The copy is enlarged by the specified amount. The original xtd::drawing::rectangle structure remains unmodified.

Parameters
rectThe xtd::drawing::rectangle with which to start. This rectangle is not modified.
szThe amount to inflate the specified rectangle.
Returns
The enlarged xtd::drawing::rectangle.
Remarks
This method makes a copy of rect, enlarges the copy, and then returns the enlarged copy. The rectangle is enlarged in both directions along an axis. For example, if a 50 by 50 rectangle is enlarged by 50 in the x-axis, the resultant rectangle will be 150 units long (the original 50, the 50 in the minus direction, and the 50 in the plus direction) maintaining the rectangle's geometric center.