RectInt

struct in UnityEngine

Switch to Manual

Description

由整数类型的 x、y、宽度、高度定义的 2D 矩形。

Variables

allPositionsWithin包含 RectInt 中所有位置的 RectInt.PositionCollection。
center矩形的中心坐标。
height矩形的高度。
max矩形的右上角。
min矩形的左下角。
position返回 RectInt 的位置 (x, y)。
size返回 RectInt 的宽度和高度。
width矩形的宽度。
x矩形的左坐标。
xMax返回 RectInt 的最大 X 值。
xMin返回 RectInt 的最小 X 值。
y矩形的上坐标。
yMax返回 RectInt 的最大 Y 值。
yMin返回 RectInt 的最小 Y 值。

Public Functions

ClampToBounds将 RectInt 的位置和大小限制在给定边界。
Contains如果给定位置处于 RectInt 内,则返回 true。
EqualsReturns true if the given RectInt is equal to this RectInt.
SetMinMax将边界设置为矩形的 min 和 max 值。
ToString返回 RectInt 的 x、y、宽度和高度。