SWidget::Paint

GENERAL EVENTS Called to tell a widget to paint itself (and it's children).

Windows
MacOS
Linux

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Widgets/SWidget.h

Include

#include "Widgets/SWidget.h"

Source

/Engine/Source/Runtime/SlateCore/Private/Widgets/SWidget.cpp

Syntax

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

Remarks

GENERAL EVENTS Called to tell a widget to paint itself (and it's children).

The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children.

Returns

The maximum layer ID attained by this widget or any of its children.

Parameters

Parameter

Description

Args

All the arguments necessary to paint this widget (

AllottedGeometry

The FGeometry that describes an area in which the widget should appear.

MyCullingRect

The clipping rectangle allocated for this widget and its children.

OutDrawElements

A list of FDrawElements to populate with the output.

LayerId

The Layer onto which this widget should be rendered.

InColorAndOpacity

Color and Opacity to be applied to all the descendants of the widget being painted

bParentEnabled

True if the parent of this widget is enabled.

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