InflateRect (C++)

From RAD Studio Code Examples
Jump to: navigation, search

Description

The following code example illustrates the usage of the InflateRect routine.

Code

#include <System.Types.hpp>

int _tmain(int argc, _TCHAR* argv[])
{
	TRect* aRectangle = new TRect(2,4,7,8);

	InflateRect(aRectangle, 1, 2);

	/* New values of coordinates:
	Left = 2-1 ; Top = 4-2; Right = 7+1; Bottom = 8+2.
	*/
	printf("Left:%d Top:%d Right:%d Bottom:%d", aRectangle->Left, aRectangle->Top, aRectangle->Right, aRectangle->Bottom);
	return 0;
}

Note: The coordinates of the plan start in the upper-left corner of the screen from (0,0).

Uses