UIAnchorResolver.Resolve(UIAnchor, float, float, Vector2) Method
Definition
Namespace: Brine2D.UI
Resolves the top-left screen-space origin for a component of the given size anchored at anchor within a screen of screenWidth x screenHeight. Center/right/bottom anchors are size-aware: they subtract the component's own size \(fully for edge anchors, by half for center anchors\) so the component's edge/center lands exactly on the anchor point rather than the component's top-left corner.
C#
internal static System.Numerics.Vector2 Resolve(Brine2D.UI.UIAnchor anchor, float screenWidth, float screenHeight, System.Numerics.Vector2 size);
Parameters
anchor UIAnchor
screenWidth System.Single
screenHeight System.Single