SFxWidget::OnPaint

This widget was created before render transforms existed for each widget, and it chose to apply the render transform AFTER the layout transform.

Windows
MacOS
Linux

Override Hierarchy

References

Module

Slate

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

Syntax

virtual int32 OnPaint
(
    const FPaintArgs & Args,
    const FGeometry & AllottedGeometry,
    const FSlateRect & MyCullingRect,
    FSlateWindowElementList & OutDrawElements,
    int32 LayerId,
    const FWidgetStyle & InWidgetStyle,
    bool bParentEnabled
) const

Remarks

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.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss