RealDocs

FGeometry::AbsolutePosition

property SlateCore Deprecated Since 4.0
Deprecated: Use GetAccumulatedLayoutTransform().GetTranslation() or LocalToAbsolute(FVector2f::ZeroVector) instead.
#include "Layout/Geometry.h"
Access: public Specifiers: const

Description

Position of the geometry in absolute space, equivalent to the translation of the accumulated layout transform. Does not account for render transforms.

Caveats & Gotchas

  • Deprecated since UE 4.x — reading this field bypasses the render transform and gives wrong results if any ancestor widget has a render transform applied. Prefer GetAccumulatedLayoutTransform().GetTranslation() or LocalToAbsolute(FVector2f::ZeroVector).
  • Made const specifically to prevent mutation; the render transform cache is computed at construction time and cannot be updated after the fact from outside the struct.
  • In windowed mode this value is window-relative, not desktop-relative. Desktop-space offset is only available if the root geometry was constructed with the desktop DPI transform.

Signature

const FVector2f AbsolutePosition

Example

Reading position (legacy code path) C++
// Prefer GetAccumulatedLayoutTransform().GetTranslation() in new code.
FVector2f Pos = MyGeometry.AbsolutePosition;
UE_LOG(LogTemp, Log, TEXT("Legacy abs pos: %s"), *Pos.ToString());

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.