Sign in Join
FPDoc Onlineexperiment

InflateRect function

In unit LCLIntf

Inflates the rectangle in all directions.

Declaration

pascal
function InflateRect(var ARect: TRect; dx: Integer; dy: Integer)
: Boolean

Arguments

ARect

This rectangle is modified.

dx

The horizontal increase, negative to decrease.

dy

The vertical increase, negative to decrease.

Function result

Always True.

Description

The deltas are applied to each side, i.e. the width and height increase by double delta amount.

Positive values inflate, negative values deflate.

The rectangle is clipped so that width and height never can become negative.

This method can be used to add or subtract a border around the rectangle.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.