Rect.insetR

Changes the given rectangle to be smaller, or larger depending on the given inset parameters.

To create an inset rectangle, use positive @d_x or @d_y values; to create a larger, encompassing rectangle, use negative @d_x or @d_y values.

The origin of the rectangle is offset by @d_x and @d_y, while the size is adjusted by (2 * @d_x, 2 * @d_y). If @d_x and @d_y are positive values, the size of the rectangle is decreased; if @d_x and @d_y are negative values, the size of the rectangle is increased.

If the size of the resulting inset rectangle has a negative width or height then the size will be set to zero.

class Rect
void
insetR
(
float dX
,
float dY
,
out Rect res
)

Parameters

dX float

the horizontal inset

dY float

the vertical inset

res Rect

return location for the inset rectangle

Meta