DreamGUI
Reference

FDreamUIWidgetGeometry

A widget's measured rect, and the handle every coordinate conversion below is asked through --

Declared in Public/DreamUIWidgetGeometryLibrary.h.

A widget's measured rect, and the handle every coordinate conversion below is asked through -- this framework's answer to Slate's FGeometry.

FGeometry itself is no use here: it describes an SWidget's place inside a Slate window, and a DreamGUI widget is a mesh in a scene that may not be on a window at all. What a caller actually wants from one is the two things kept below -- how big the widget is in its own units, and where its rect lands in viewport pixels -- plus a way to move a point between those spaces, which is what the library does.

THREE SPACES, named the way UMG names them:

  • LOCAL: the widget's own 2D space, origin at its BOTTOM-LEFT corner, X right, Y up, in widget units. Bottom-left rather than Slate's top-left because every other normalized coordinate in this framework (AnchorData.Pivot, RenderTransformPivot, the canvas's own conversions) already puts zero at the bottom left, and being consistent inside the fork beats matching the other engine on one axis.
  • ABSOLUTE: viewport pixels, origin TOP-LEFT -- the same numbers a mouse position arrives in, and the same space UDreamCanvas::ConvertPositionFromCanvasToViewport produces. Slate's "absolute" is desktop pixels; in a game viewport the two differ only by the window's own position, which nothing in this framework has a use for.
  • VIEWPORT: absolute divided by the DPI scale, which is what UMG's LocalToViewport hands back alongside the pixel position.

bHasAbsolute is false for a widget whose rect cannot be placed in the viewport at all -- a world-space canvas with no player camera to project through, a widget that is not under a canvas yet, a point behind the eye. Every conversion answers false in the same cases rather than returning a plausible number from the wrong space.

Properties

NameTypeCategoryIn the details panelFrom BlueprintDescription
WidgetTWeakObjectPtr<UDreamWidget>DreamGUIGeometry-read only
LocalSizeFVector2DDreamGUIGeometry-read only
AbsolutePositionFVector2DDreamGUIGeometry-read only
AbsoluteSizeFVector2DDreamGUIGeometry-read only
bHasAbsoluteboolDreamGUIGeometry-read only

On this page