FGeometry::GetAbsoluteSize
#include "Layout/Geometry.h"
Access: public
Specifiers: inlineconst
Description
Returns the size of the geometry transformed into absolute space by applying the accumulated render transform to the local size vector.
Caveats & Gotchas
- • This transforms the local size vector through the render transform, so for rotated widgets the absolute size represents the axis-aligned bounding box of the transformed size, not the visual footprint. Use GetRenderBoundingRect() if you need the actual bounding rect.
- • On high-DPI displays the absolute size is in physical pixels relative to the DPI scale of the window, not CSS pixels. Divide by the DPI scale if you need logical pixel units.
Signature
inline UE::Slate::FDeprecateVector2DResult GetAbsoluteSize() const Return Type
UE::Slate::FDeprecateVector2DResult Example
Check if widget is large enough to render details C++
FVector2f AbsSize = FVector2f(MyGeometry.GetAbsoluteSize());
if (AbsSize.X > 64.0f && AbsSize.Y > 64.0f)
{
// Render high-detail version
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?