inset

fun inset(dx: Int, dy: Int)

Inset the rectangle by (dx,dy). If dx is positive, then the sides are moved inwards, making the rectangle narrower. If dx is negative, then the sides are moved outwards, making the rectangle wider. The same holds true for dy and the top and bottom.

Parameters

dx

The amount to add(subtract) from the rectangle's left(right)

dy

The amount to add(subtract) from the rectangle's top(bottom)


fun inset(insets: Rect)

Insets the rectangle on all sides specified by the dimensions of the insets rectangle.

Parameters

insets

The rectangle specifying the insets on all side.


fun inset(left: Int, top: Int, right: Int, bottom: Int)

Insets the rectangle on all sides specified by the insets.

Parameters

left

The amount to add from the rectangle's left

top

The amount to add from the rectangle's top

right

The amount to subtract from the rectangle's right

bottom

The amount to subtract from the rectangle's bottom