Navigation
API > API/Runtime > API/Runtime/SlateCore
Represents the position, size, and absolute position of a Widget in Slate. The absolute location of a geometry is usually screen space or window space depending on where the geometry originated. Geometries are usually paired with a SWidget pointer in order to provide information about a specific widget (see FArrangedWidget). A Geometry's parent is generally thought to be the Geometry of the the corresponding parent widget.
| Name | FGeometry |
| Type | struct |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Layout/Geometry.h |
| Include Path | #include "Layout/Geometry.h" |
Syntax
USTRUCT (BlueprintType )
struct FGeometry
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGeometry
(
const UE::Slate::FDeprecateVector2DParameter& InLocalSize, |
Construct a new geometry with a given size in LocalSpace that is attached to a parent geometry with the given layout and render transform. | Layout/Geometry.h | |
FGeometry
(
const UE::Slate::FDeprecateVector2DParameter& InLocalSize, |
Construct a new geometry with a given size in LocalSpace (and identity render transform) that is attached to a parent geometry with the given layout and render transform. | Layout/Geometry.h | |
FGeometry
(
const UE::Slate::FDeprecateVector2DParameter& OffsetFromParent, |
!!! DEPRECATED FUNCTION !!! Use MakeChild taking a layout transform instead! Construct a new geometry given the following parameters: | Layout/Geometry.h | |
FGeometry () |
Default constructor. Creates a geometry with identity transforms. | Layout/Geometry.h | |
| Copy constructor. | Layout/Geometry.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AbsolutePosition | const FVector2f | !!! DEPRECATED !!! These legacy public members should ideally not be referenced, as they do not account for the render transform. | Layout/Geometry.h | |
| Position | const FVector2f | !!! DEPRECATED !!! | Layout/Geometry.h | |
| Scale | const float | !!! DEPRECATED !!! These legacy public members should ideally not be referenced, as they do not account for the render transform. | Layout/Geometry.h | |
| Size | const FDeprecateSlateVector2D | !!! DEPRECATED !!! Use GetLocalSize() accessor instead of directly accessing public members. | Layout/Geometry.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AccumulatedRenderTransform | FSlateRenderTransform | Concatenated Render Transform. | Layout/Geometry.h | |
| bHasRenderTransform | const uint8 | Layout/Geometry.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UE::Slate::FDeprecateVector2DResult AbsoluteToLocal
(
UE::Slate::FDeprecateVector2DParameter AbsoluteCoordinate |
Absolute coordinates could be either desktop or window space depending on what space the root of the widget hierarchy is in. | Layout/Geometry.h | |
void AppendTransform
(
const FSlateLayoutTransform& LayoutTransform |
Special case method to append a layout transform to a geometry. | Layout/Geometry.h | |
UE::Slate::FDeprecateVector2DResult GetAbsolutePosition() |
Get the absolute position in render space. | Layout/Geometry.h | |
UE::Slate::FDeprecateVector2DResult GetAbsolutePositionAtCoordinates
(
const UE::Slate::FDeprecateVector2DParameter& NormalCoordinates |
Get the absolute position on the surface of the geometry using normalized coordinates. | Layout/Geometry.h | |
UE::Slate::FDeprecateVector2DResult GetAbsoluteSize() |
Get the absolute size of the geometry in render space. | Layout/Geometry.h | |
FSlateLayoutTransform GetAccumulatedLayoutTransform() |
Layout/Geometry.h | ||
const FSlateRenderTransform & GetAccumulatedRenderTransform() |
Layout/Geometry.h | ||
UE::Slate::FDeprecateVector2DResult GetDrawSize () |
!!! DEPRECATED !!! This legacy function does not account for render transforms. | Layout/Geometry.h | |
FSlateRect GetLayoutBoundingRect
(
const FSlateRect& LocalSpaceRect |
Layout/Geometry.h | ||
FSlateRect GetLayoutBoundingRect
(
const FMargin& LocalSpaceExtendBy |
Layout/Geometry.h | ||
| Layout/Geometry.h | |||
UE::Slate::FDeprecateVector2DResult GetLocalPositionAtCoordinates
(
const UE::Slate::FDeprecateVector2DParameter& NormalCoordinates |
Get the local position on the surface of the geometry using normalized coordinates. | Layout/Geometry.h | |
UE::Slate::FDeprecateVector2DResult GetLocalSize() |
Layout/Geometry.h | ||
FSlateRect GetRenderBoundingRect
(
const FSlateRect& LocalSpaceRect |
Layout/Geometry.h | ||
FSlateRect GetRenderBoundingRect
(
const FMargin& LocalSpaceExtendBy |
Layout/Geometry.h | ||
| Layout/Geometry.h | |||
bool HasRenderTransform() |
Layout/Geometry.h | ||
bool IsUnderLocation
(
const UE::Slate::FDeprecateVector2DParameter& AbsoluteCoordinate |
Absolute coordinates could be either desktop or window space depending on what space the root of the widget hierarchy is in. | Layout/Geometry.h | |
UE::Slate::FDeprecateVector2DResult LocalToAbsolute
(
UE::Slate::FDeprecateVector2DParameter LocalCoordinate |
Translates local coordinates into absolute coordinates | Layout/Geometry.h | |
UE::Slate::FDeprecateVector2DResult LocalToRoundedLocal
(
UE::Slate::FDeprecateVector2DParameter LocalCoordinate |
Translates the local coordinates into local coordinates that after being transformed into absolute space will be rounded to a whole number or approximately a whole number. | Layout/Geometry.h | |
FArrangedWidget MakeChild
(
const TSharedRef< SWidget >& ChildWidget, |
Create a child geometry+widget relative to this one using the given LayoutGeometry. | Layout/Geometry.h | |
FGeometry MakeChild
(
const UE::Slate::FDeprecateVector2DParameter& InLocalSize, |
Create a child geometry relative to this one with a given local space size, layout transform, and identity render transform. | Layout/Geometry.h | |
| Layout/Geometry.h | |||
FArrangedWidget MakeChild
(
const TSharedRef< SWidget >& ChildWidget, |
FGeometry Arranged Widget Inlined Functions. | Layout/Geometry.h | |
FGeometry MakeChild
(
const UE::Slate::FDeprecateVector2DParameter& InLocalSize, |
Create a child geometry relative to this one with a given local space size, layout transform, and render transform. | Layout/Geometry.h | |
FArrangedWidget MakeChild
(
const TSharedRef< SWidget >& ChildWidget, |
!!! DEPRECATED FUNCTION !!! Use MakeChild taking a layout transform instead! Create a child geometry+widget relative to this one with a given local space size and layout transform given by a scale+offset. | Layout/Geometry.h | |
FPaintGeometry ToInflatedPaintGeometry
(
const UE::Slate::FDeprecateVector2DParameter& InflateAmount |
Create a paint geometry relative to this one that whose local space is "inflated" by the specified amount in each direction. | Layout/Geometry.h | |
FPaintGeometry ToOffsetPaintGeometry
(
const UE::Slate::FDeprecateVector2DParameter& LocalOffset |
!!! DEPRECATED FUNCTION !!! Use ToPaintGeometry taking a layout transform instead! Create a paint geometry relative to this one with the same size size and a given local space offset. | Layout/Geometry.h | |
FPaintGeometry ToPaintGeometry
(
const FSlateLayoutTransform& LayoutTransform |
Create a paint geometry with the same size as this geometry with a given layout transform. | Layout/Geometry.h | |
FPaintGeometry ToPaintGeometry
(
const UE::Slate::FDeprecateVector2DParameter& InLocalSize, |
Create a paint geometry relative to this one with a given local space size and layout transform. | Layout/Geometry.h | |
FPaintGeometry ToPaintGeometry
(
const UE::Slate::FDeprecateVector2DParameter& InLocalSize, |
Create a paint geometry relative to this one with a given local space size and layout transform. | Layout/Geometry.h | |
| Create a paint geometry that represents this geometry. | Layout/Geometry.h | ||
FString ToString() |
Layout/Geometry.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FGeometry MakeRoot
(
const UE::Slate::FDeprecateVector2DParameter& InLocalSize, |
Makes a new geometry that is essentially the root of a hierarchy (has no parent transforms to inherit). | Layout/Geometry.h | |
static FGeometry MakeRoot
(
const UE::Slate::FDeprecateVector2DParameter& InLocalSize, |
Makes a new geometry that is essentially the root of a hierarchy (has no parent transforms to inherit). | Layout/Geometry.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FGeometry& Other |
Test geometries for strict inequality (i.e. exact float equality negated). | Layout/Geometry.h | |
| !!! HACK!!! We're keeping members of FGeometry const to prevent mutability without making them private, for backward compatibility. | Layout/Geometry.h | ||
bool operator==
(
const FGeometry& Other |
Test geometries for strict equality (i.e. exact float equality). | Layout/Geometry.h |