UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FPaintGeometry Struct Reference

#include <PaintGeometry.h>

Public Member Functions

UE::Slate::FDeprecateVector2DResult GetLocalSize () const
 
const FSlateRenderTransformGetAccumulatedRenderTransform () const
 
void CommitTransformsIfUsingLegacyConstructor () const
 
bool HasRenderTransform () const
 
 FPaintGeometry ()
 
 FPaintGeometry (const FSlateLayoutTransform &InAccumulatedLayoutTransform, const FSlateRenderTransform &InAccumulatedRenderTransform, const UE::Slate::FDeprecateVector2DParameter &InLocalSize, bool bInHasRenderTransform)
 
 FPaintGeometry (UE::Slate::FDeprecateVector2DParameter InDrawPosition, UE::Slate::FDeprecateVector2DParameter InDrawSize, float InDrawScale)
 
void AppendTransform (const FSlateLayoutTransform &LayoutTransform)
 
void SetRenderTransform (const FSlateRenderTransform &RenderTransform)
 

Public Attributes

FVector2f DrawPosition
 
float DrawScale
 

Detailed Description

A Paint geometry contains the window-space (draw-space) info to draw an element on the screen.

It contains the size of the element in the element's local space along with the transform needed to position the element in window space.

DrawPosition/DrawSize/DrawScale are maintained for legacy reasons, but are deprecated:

The DrawPosition and DrawSize are already positioned and
scaled for immediate consumption by the draw code.

The DrawScale is only applied to the internal aspects of the draw primitives. e.g. Line thickness, 3x3 grid margins, etc.

Constructor & Destructor Documentation

◆ FPaintGeometry() [1/3]

FPaintGeometry::FPaintGeometry ( )
inline

Default ctor.

◆ FPaintGeometry() [2/3]

FPaintGeometry::FPaintGeometry ( const FSlateLayoutTransform InAccumulatedLayoutTransform,
const FSlateRenderTransform InAccumulatedRenderTransform,
const UE::Slate::FDeprecateVector2DParameter InLocalSize,
bool  bInHasRenderTransform 
)
inline

Creates and initializes a new instance.

Parameters
InLocalSizeThe size in local space
InAccumulatedLayoutTransformThe accumulated layout transform (from an FGeometry)
InAccumulatedRenderTransformThe accumulated render transform (from an FGeometry)

◆ FPaintGeometry() [3/3]

FPaintGeometry::FPaintGeometry ( UE::Slate::FDeprecateVector2DParameter  InDrawPosition,
UE::Slate::FDeprecateVector2DParameter  InDrawSize,
float  InDrawScale 
)
inline

Member Function Documentation

◆ AppendTransform()

void FPaintGeometry::AppendTransform ( const FSlateLayoutTransform LayoutTransform)
inline

Special case method to append a layout transform to a paint geometry. This is used in cases where the FGeometry was arranged in desktop space and we need to undo the root desktop translation to get into window space. If you find yourself wanting to use this function, ask someone if there's a better way.

Parameters
LayoutTransformAn additional layout transform to append to this paint geometry.

◆ CommitTransformsIfUsingLegacyConstructor()

void FPaintGeometry::CommitTransformsIfUsingLegacyConstructor ( ) const
inline

Support mutable geometries constructed in window space, and possibly mutated later, as all legacy members are public. In these cases we defer creating of the RenderTransform and LocalSize until rendering time to ensure that all member changes have finished. WARNING: Legacy usage does NOT support render transforms!

◆ GetAccumulatedRenderTransform()

const FSlateRenderTransform & FPaintGeometry::GetAccumulatedRenderTransform ( ) const
inline

Access the final render transform. Must call CommitTransformsIfUsingLegacyConstructor() first if legacy ctor is used.

◆ GetLocalSize()

UE::Slate::FDeprecateVector2DResult FPaintGeometry::GetLocalSize ( ) const
inline

Get the Size of the geometry in local space. Must call CommitTransformsIfUsingLegacyConstructor() first if legacy ctor is used.

◆ HasRenderTransform()

bool FPaintGeometry::HasRenderTransform ( ) const
inline

◆ SetRenderTransform()

void FPaintGeometry::SetRenderTransform ( const FSlateRenderTransform RenderTransform)
inline

Special case method to replace the render transform on a paint geometry.

Parameters
RenderTransformAn additional layout transform to append to this paint geometry.

Member Data Documentation

◆ DrawPosition

FVector2f FPaintGeometry::DrawPosition

!!! DEPRECATED!!! Drawing should only happen in local space to ensure render transforms work. WARNING: This legacy member represents is LAYOUT space, and does not account for render transforms.

Render-space position at which we will draw.

◆ DrawScale

float FPaintGeometry::DrawScale

!!! DEPRECATED!!! Drawing should only happen in local space to ensure render transforms work. WARNING: This legacy member represents is LAYOUT space, and does not account for render transforms.

Only affects the draw aspects of individual draw elements. e.g. line thickness, 3x3 grid margins


The documentation for this struct was generated from the following file: