Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Inflate(Rect, float, float, float, float)

Creates and returns an enlarged copy of the specified rectangle. The copy is enlarged by the specified amounts.
Read time 1 minuteLast updated 12 days ago

Definition

public static Rect Inflate(Rect a, float left, float top, float right, float bottom)

Parameters

The original rectangle.

left

The amount to inflate the rectangle towards the left.

The amount to inflate the rectangle towards the top.

right

The amount to inflate the rectangle towards the right.

bottom

The amount to inflate the rectangle towards the bottom.

Returns

Type

Description

Rect