Choose your operating system:
Windows
macOS
Linux
| SWidget::OnPaint()
|
Module |
|
Header |
/Engine/Source/Runtime/Slate/Public/Widgets/Layout/SFxWidget.h |
Include |
#include "Widgets/Layout/SFxWidget.h" |
Source |
/Engine/Source/Runtime/Slate/Private/Widgets/Layout/SFxWidget.cpp |
virtual int32 OnPaint
(
const FPaintArgs & Args,
const FGeometry & AllottedGeometry,
const FSlateRect & MyCullingRect,
FSlateWindowElementList & OutDrawElements,
int32 LayerId,
const FWidgetStyle & InWidgetStyle,
bool bParentEnabled
) const
This widget was created before render transforms existed for each widget, and it chose to apply the render transform AFTER the layout transform. This means leveraging the render transform of FGeometry would be expensive, as we would need to use Concat(LayoutTransform, RenderTransform, Inverse(LayoutTransform). Instead, we maintain the old way of doing it by modifying the AllottedGeometry only during rendering to append the widget's implied RenderTransform to the existing LayoutTransform.