Table of Contents

Class AnchorExtensions

Namespace
Stride.CommunityToolkit.Rendering
Assembly
Stride.CommunityToolkit.dll

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

anchor Anchor

Which point of the rectangle.

size Vector2

The 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.

Remarks

The enum is laid out as a 3 by 3 grid row by row, so the ordinal gives the column and the row.