Class ScreenAnchorExtensions
Where each ScreenAnchor is for a rectangle of a given size.
public static class ScreenAnchorExtensions
- Inheritance
-
ScreenAnchorExtensions
Methods
At(ScreenAnchor, Vector2)
The anchor's position, in the coordinates of a rectangle whose top left is the origin.
public static Vector2 At(this ScreenAnchor anchor, Vector2 size)
Parameters
anchorScreenAnchorWhich point of the rectangle.
sizeVector2The rectangle's width and height.
Returns
- Vector2
The point, in the rectangle's own coordinates: a corner, the middle of an edge or the centre.