FGeometry::GetRenderBoundingRect
#include "Layout/Geometry.h"
Access: public
Specifiers: FORCEINLINE_DEBUGGABLEconst
Description
Returns the axis-aligned bounding rectangle of this geometry in absolute space computed using the full accumulated render transform, including any rotation or skew.
Caveats & Gotchas
- • For widgets with rotation, the bounding rect will be larger than the widget's visual size because it must encompass the rotated corners. This is not the tight oriented bounding box — use FSlateRotatedRect if you need that.
- • More expensive than GetLayoutBoundingRect because the render transform may involve a matrix inversion. Avoid calling in tight per-frame loops.
- • Like GetLayoutBoundingRect, overloads exist to extend the local-space rect before transforming, useful for adding hit-test padding.
Signature
FORCEINLINE_DEBUGGABLE FSlateRect GetRenderBoundingRect() const Return Type
FSlateRect Example
Draw a debug outline around the rendered widget bounds C++
FSlateRect RenderBounds = MyGeometry.GetRenderBoundingRect();
// Use RenderBounds.Left/Top/Right/Bottom for overlay drawing.
FSlateDrawElement::MakeBox(OutDrawElements, LayerId,
MyGeometry.ToPaintGeometry(),
FAppStyle::GetBrush("Debug.Border")); Tags
Version History
Introduced in: 4.14
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?