FPaintGeometry

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

Windows
MacOS
Linux

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Layout/PaintGeometry.h

Include

#include "Layout/PaintGeometry.h"

Syntax

struct FPaintGeometry

Remarks

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.

Variables

Name Description

Public variable

FVector2D

 

DrawPosition

!!! DEPRECATED!!! Drawing should only happen in local space to ensure render transforms work.

Public variable

float

 

DrawScale

!!! DEPRECATED!!! Drawing should only happen in local space to ensure render transforms work.

Constructors

Name Description

Public function

FPaintGeometry()

Default ctor.

Public function

FPaintGeometry

(
    FVector2D InDrawPosition,
    FVector2D InDrawSize,
    float InDrawScale
)

!!! DEPRECATED!!! This is legacy and should be removed!

Public function

FPaintGeometry

(
    const FSlateLayoutTransform& InAcc...,
    const FSlateRenderTransform& InAcc...,
    const FVector2D& InLocalSize,
    bool bInHasRenderTransform
)

Creates and initializes a new instance.

Functions

Name Description

Public function

void

 

AppendTransform

(
    const FSlateLayoutTransform& Layou...
)

Special case method to append a layout transform to a paint geometry.

Public function Const

void

 

CommitTransformsIfUsingLegacyConstructor()

Support mutable geometries constructed in window space, and possibly mutated later, as all legacy members are public.

Public function Const

const FSlate...

 

GetAccumulatedRenderTransform()

Access the final render transform.

Public function Const

const FVecto...

 

GetLocalSize()

Get the Size of the geometry in local space.

Public function Const

bool

 

HasRenderTransform()

Public function

void

 

SetRenderTransform

(
    const FSlateRenderTransform& Rende...
)

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

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