AlignRectToDevice
Align a local space rectangle to the pixel grid.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.IMGUIModule
AlignRectToDevice(Rect, int, int)
Align a local space rectangle to the pixel grid.
public static Rect AlignRectToDevice(Rect rect, out int widthInPixels, out int heightInPixels)
Parameters
Returns
Type | Description |
|---|---|
| Rect | The aligned rectangle in local space. |
Remarks
Aligns the top-left and bottom-right corners of the provided local space rectangle to the pixel grid and returns the local space axis-aligned bounding box that encompasses those points.
AlignRectToDevice(Rect)
Align a local space rectangle to the pixel grid.
public static Rect AlignRectToDevice(Rect rect)
Parameters
Returns
Type | Description |
|---|---|
| Rect | The aligned rectangle in local space. |
Remarks
Aligns the top-left and bottom-right corners of the provided local space rectangle to the pixel grid and returns the local space axis-aligned bounding box that encompasses those points.