Class AnchorExtensions
Where each Anchor is for a rectangle of a given size.
public static class AnchorExtensions
- Inheritance
-
AnchorExtensions
Methods
At(Anchor, Vector2)
The anchor's position, in the coordinates of a rectangle whose top left is the origin.
public static Vector2 At(this Anchor anchor, Vector2 size)
Parameters
Returns
- Vector2
The point, in the rectangle's own coordinates: a corner, the middle of an edge or the centre.
Remarks
The enum is laid out as a 3 by 3 grid row by row, so the ordinal gives the column and the row.