Navigation
API > API/Runtime > API/Runtime/SlateCore
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.
| Name | FPaintGeometry |
| Type | struct |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Layout/PaintGeometry.h |
| Include Path | #include "Layout/PaintGeometry.h" |
Syntax
struct FPaintGeometry
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Default ctor. | Layout/PaintGeometry.h | ||
FPaintGeometry
(
UE::Slate::FDeprecateVector2DParameter InDrawPosition, |
!!! DEPRECATED!!! This is legacy and should be removed! | Layout/PaintGeometry.h | |
FPaintGeometry
(
const FSlateLayoutTransform& InAccumulatedLayoutTransform, |
Creates and initializes a new instance. | Layout/PaintGeometry.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| DrawPosition | FVector2f | !!! DEPRECATED!!! Drawing should only happen in local space to ensure render transforms work. | Layout/PaintGeometry.h | |
| DrawScale | float | !!! DEPRECATED!!! Drawing should only happen in local space to ensure render transforms work. | Layout/PaintGeometry.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AccumulatedRenderTransform | FSlateRenderTransform | Final render transform for drawing. | Layout/PaintGeometry.h | |
| bHasRenderTransform | uint8 | Layout/PaintGeometry.h | ||
| bUsingLegacyConstructor | uint8 | Support legacy constructors. | Layout/PaintGeometry.h | |
| DrawSize | FVector2f | Mutable to support legacy constructors. Doesn't account for render transforms. | Layout/PaintGeometry.h | |
| LocalSize | FVector2f | Mutable to support legacy constructors. | Layout/PaintGeometry.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AppendTransform
(
const FSlateLayoutTransform& LayoutTransform |
Special case method to append a layout transform to a paint geometry. | Layout/PaintGeometry.h | |
| Support mutable geometries constructed in window space, and possibly mutated later, as all legacy members are public. | Layout/PaintGeometry.h | ||
const FSlateRenderTransform & GetAccumulatedRenderTransform () |
Access the final render transform. | Layout/PaintGeometry.h | |
UE::Slate::FDeprecateVector2DResult GetLocalSize () |
Get the Size of the geometry in local space. | Layout/PaintGeometry.h | |
bool HasRenderTransform() |
Layout/PaintGeometry.h | ||
void SetRenderTransform
(
const FSlateRenderTransform& RenderTransform |
Special case method to replace the render transform on a paint geometry. | Layout/PaintGeometry.h |