FSlateDrawElement

[FSlateDrawElement](API\Runtime\SlateCore\Rendering\FSlateDrawElement) is the building block for Slate's rendering interface.

Windows
MacOS
Linux

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Rendering/DrawElements.h

Include

#include "Rendering/DrawElements.h"

Syntax

class FSlateDrawElement

Remarks

FSlateDrawElement is the building block for Slate's rendering interface. Slate describes its visual output as an ordered list of FSlateDrawElement s

Constructors

Name Description

Public function

FSlateDrawElement()

Destructors

Name Description

Public function

~FSlateDrawElement()

Functions

Name Description

Public function

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

Public function

void

 

ApplyPositionOffset

(
    const FVector2D& InOffset
)

Update element cached position with an arbitrary offset

Public function Const

ESlateBatchD...

 

GetBatchFlags()

Public function Const

const FClipS...

 

GetClippingHandle()

Public function

PayloadType ...

 

GetDataPayload()

Public function Const

const Payloa...

 

GetDataPayload()

Public function Const

ESlateDrawEf...

 

GetDrawEffects()

Public function Const

EElementType

 

GetElementType()

Public function Const

FSlateLayout...

 

GetInverseLayoutTransform()

Public function Const

int32

 

GetLayer()

Public function Const

const FVecto...

 

GetLocalSize()

Public function Const

const FVecto...

 

GetPosition()

Public function Const

int32

 

GetPrecachedClippingIndex()

Public function Const

const FSlate...

 

GetRenderTransform()

Public function Const

float

 

GetScale()

Public function Const

const int8

 

GetSceneIndex()

Public function Const

bool

 

IsCached()

Public function Const

bool

 

IsPixelSnapped()

Public function Static

void

 

MakeBox

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...,
    const FSlateBrush* InBrush,
    ESlateDrawEffect InDrawEffects,
    const FLinearColor& InTint
)

Creates a box element based on the following diagram.

Public function Static

void

 

MakeCubicBezierSpline

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...,
    const FVector2D& P0,
    const FVector2D& P1,
    const FVector2D& P2,
    const FVector2D& P3,
    float InThickness,
    ESlateDrawEffect InDrawEffects,
    const FLinearColor& InTint
)

Creates a Bezier Spline element

Public function Static

void

 

MakeCustom

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    TSharedPtr< ICustomSlateElement, ES...
)

Creates a custom element which can be used to manually draw into the Slate render target with graphics API calls rather than Slate elements

Public function Static

void

 

MakeCustomVerts

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FSlateResourceHandle& InRend...,
    const TArray< FSlateVertex >& InVe...,
    const TArray< SlateIndex >& InInde...,
    ISlateUpdatableInstanceBuffer*...,
    uint32 InInstanceOffset,
    uint32 InNumInstances,
    ESlateDrawEffect InDrawEffects
)

Public function Static

void

 

MakeDebugQuad

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...
)

Creates a wireframe quad for debug purposes

Public function Static

void

 

MakeDrawSpaceSpline

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FVector2D& InStart,
    const FVector2D& InStartDir,
    const FVector2D& InEnd,
    const FVector2D& InEndDir,
    float InThickness,
    ESlateDrawEffect InDrawEffects,
    const FLinearColor& InTint
)

Just like MakeSpline but in draw-space coordinates.

Public function Static

void

 

MakeGradient

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...,
    TArray< FSlateGradientStop > InGrad...,
    EOrientation InGradientType,
    ESlateDrawEffect InDrawEffects
)

Creates a gradient element

Public function Static

void

 

MakeLines

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...,
    const TArray< FVector2D >& Points,
    const TArray< FLinearColor >& Poin...,
    ESlateDrawEffect InDrawEffects,
    const FLinearColor& InTint,
    bool bAntialias,
    float Thickness
)

Creates a line defined by the provided points

Public function Static

void

 

MakeLines

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...,
    const TArray< FVector2D >& Points,
    ESlateDrawEffect InDrawEffects,
    const FLinearColor& InTint,
    bool bAntialias,
    float Thickness
)

Creates a line defined by the provided points

Public function Static

void

 

MakePostProcessPass

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...,
    const FVector4& Params,
    int32 DownsampleAmount
)

Public function Static

void

 

MakeRotatedBox

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...,
    const FSlateBrush* InBrush,
    ESlateDrawEffect InDrawEffects,
    float Angle,
    TOptional< FVector2D > InRotationPo...,
    ERotationSpace RotationSpace,
    const FLinearColor& InTint
)

Public function Static

void

 

MakeShapedText

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...,
    const FShapedGlyphSequenceRef& InS...,
    ESlateDrawEffect InDrawEffects,
    const FLinearColor& BaseTint,
    const FLinearColor& OutlineTint
)

Creates a text element which displays a series of shaped glyphs on the screen

Public function Static

void

 

MakeSpline

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...,
    const FVector2D& InStart,
    const FVector2D& InStartDir,
    const FVector2D& InEnd,
    const FVector2D& InEndDir,
    float InThickness,
    ESlateDrawEffect InDrawEffects,
    const FLinearColor& InTint
)

Creates a Hermite Spline element

Public function Static

void

 

MakeText

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...,
    const FString& InText,
    const FSlateFontInfo& InFontInfo,
    ESlateDrawEffect InDrawEffects,
    const FLinearColor& InTint
)

Public function Static

void

 

MakeText

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...,
    const FText& InText,
    const FSlateFontInfo& InFontInfo,
    ESlateDrawEffect InDrawEffects,
    const FLinearColor& InTint
)

Public function Static

void

 

MakeText

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...,
    const FString& InText,
    const int32 StartIndex,
    const int32 EndIndex,
    const FSlateFontInfo& InFontInfo,
    ESlateDrawEffect InDrawEffects,
    const FLinearColor& InTint
)

Creates a text element which displays a string of a rendered in a certain font on the screen

Public function Static

void

 

MakeViewport

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...,
    TSharedPtr< const ISlateViewport > ...,
    ESlateDrawEffect InDrawEffects,
    const FLinearColor& InTint
)

Creates a viewport element which is useful for rendering custom data in a texture into Slate

Public function

void

 

SetCachedClippingState

(
    const FSlateClippingState* Cac...
)

Public function

void

 

SetIsCached

(
    bool bInIsCached
)

Public function

void

 

SetPosition

(
    const FVector2D& InPosition
)

Public function

void

 

SetPrecachedClippingIndex

(
    int32 InClippingIndex
)

Public function

void

 

SetRenderTransform

(
    const FSlateRenderTransform& InRen...
)

Enums

Name

Description

Public enum

ERotationSpace

Deprecated Functions

Name Description

Public function Const

const int32

 

GetClippingIndex()

GetClippingIndex has been deprecated. If you were using this please use GetPrecachedClippingIndex instead.

Public function Static

void

 

MakeBox

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FPaintGeometry& PaintGeometr...,
    const FSlateBrush* InBrush,
    const FSlateResourceHandle& InRend...,
    ESlateDrawEffect InDrawEffects,
    const FLinearColor& InTint
)

Storing and passing in a FSlateResourceHandle to MakeBox is no longer necessary.

Public function Static

void

 

MakeDrawSpaceGradientSpline

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FVector2D& InStart,
    const FVector2D& InStartDir,
    const FVector2D& InEnd,
    const FVector2D& InEndDir,
    const FSlateRect InClippingRect,
    const TArray< FSlateGradientStop > ...,
    float InThickness,
    ESlateDrawEffect InDrawEffects
)

Splines with color gradients will not be supported in the future.

Public function Static

void

 

MakeDrawSpaceGradientSpline

(
    FSlateWindowElementList& ElementLi...,
    uint32 InLayer,
    const FVector2D& InStart,
    const FVector2D& InStartDir,
    const FVector2D& InEnd,
    const FVector2D& InEndDir,
    const TArray< FSlateGradientStop > ...,
    float InThickness,
    ESlateDrawEffect InDrawEffects
)

Splines with color gradients will not be supported in the future.

Public function

void

 

SetClippingIndex

(
    const int32 InClippingIndex
)

SetClippingIndex has been deprecated. If you were using this please use SetPrecachedClippingIndex instead.

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