Navigation
API > API/Runtime > API/Runtime/SlateCore > API/Runtime/SlateCore/Layout
References
| Module | SlateCore |
| Header | /Engine/Source/Runtime/SlateCore/Public/Layout/Geometry.h |
| Include | #include "Layout/Geometry.h" |
Syntax
USTRUCT (BlueprintType )
struct FGeometry
Remarks
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.
Variables
| Type | Name | Description | |
|---|---|---|---|
| const FVector2f | AbsolutePosition | !!! DEPRECATED !!! These legacy public members should ideally not be referenced, as they do not account for the render transform. | |
| const FVector2f | Position | !!! DEPRECATED !!! | |
| const float | Scale | !!! DEPRECATED !!! These legacy public members should ideally not be referenced, as they do not account for the render transform. | |
| const FDeprecateSlateVector2D | Size | !!! DEPRECATED !!! Use GetLocalSize() accessor instead of directly accessing public members. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FGeometry () |
Default constructor. Creates a geometry with identity transforms. | ||
| Copy constructor. | |||
FGeometry
(
const UE::Slate::FDeprecateVector2DParameter& OffsetFromParent, |
!!! DEPRECATED FUNCTION !!! Use MakeChild taking a layout transform instead! Construct a new geometry given the following parameters: |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FORCEINLINE_DEBUGGABLEUE::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. | |
| FORCEINLINE_DEBUGGABLE void | AppendTransform
(
const FSlateLayoutTransform& LayoutTransform |
Special case method to append a layout transform to a geometry. | |
| UE::Slate::FDeprecateVector2DResult | Get the absolute position in render space. | ||
| UE::Slate::FDeprecateVector2DResult | GetAbsolutePositionAtCoordinates
(
const UE::Slate::FDeprecateVector2DParameter& NormalCoordinates |
Get the absolute position on the surface of the geometry using normalized coordinates. | |
| UE::Slate::FDeprecateVector2DResult | Get the absolute size of the geometry in render space. | ||
| FSlateLayoutTransform | |||
| const FSlateRenderTransform & | |||
| FORCEINLINE_DEBUGGABLEUE::Slate::FDeprecateVector2DResult | GetDrawSize () |
!!! DEPRECATED !!! This legacy function does not account for render transforms. | |
| FORCEINLINE_DEBUGGABLEFSlateRect | GetLayoutBoundingRect
(
const FMargin& LocalSpaceExtendBy |
||
| FORCEINLINE_DEBUGGABLEFSlateRect | GetLayoutBoundingRect
(
const FSlateRect& LocalSpaceRect |
||
| FORCEINLINE_DEBUGGABLEFSlateRect | |||
| UE::Slate::FDeprecateVector2DResult | GetLocalPositionAtCoordinates
(
const UE::Slate::FDeprecateVector2DParameter& NormalCoordinates |
Get the local position on the surface of the geometry using normalized coordinates. | |
| UE::Slate::FDeprecateVector2DResult | GetLocalSize () |
||
| FORCEINLINE_DEBUGGABLEFSlateRect | GetRenderBoundingRect
(
const FSlateRect& LocalSpaceRect |
||
| FORCEINLINE_DEBUGGABLEFSlateRect | GetRenderBoundingRect
(
const FMargin& LocalSpaceExtendBy |
||
| FORCEINLINE_DEBUGGABLEFSlateRect | |||
| bool | |||
| FORCEINLINE_DEBUGGABLE 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. | |
| FORCEINLINE_DEBUGGABLEUE::Slate::FDeprecateVector2DResult | LocalToAbsolute
(
UE::Slate::FDeprecateVector2DParameter LocalCoordinate |
Translates local coordinates into absolute coordinates | |
| FORCEINLINE_DEBUGGABLEUE::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. | |
| FArrangedWidget | MakeChild
(
const TSharedRef< SWidget >& ChildWidget, |
Create a child geometry+widget relative to this one using the given LayoutGeometry. | |
| 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. | |
| FORCEINLINE_DEBUGGABLEFGeometry | 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. | |
| FORCEINLINE_DEBUGGABLEFGeometry | MakeChild
(
const FSlateRenderTransform& RenderTransform, |
||
| FORCEINLINE_DEBUGGABLEFGeometry | 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. | |
| FArrangedWidget | MakeChild
(
const TSharedRef< SWidget >& ChildWidget, |
FGeometry Arranged Widget Inlined Functions. | |
| FORCEINLINE_DEBUGGABLEFGeometry | MakeRoot
(
const UE::Slate::FDeprecateVector2DParameter& InLocalSize, |
Makes a new geometry that is essentially the root of a hierarchy (has no parent transforms to inherit). | |
| FORCEINLINE_DEBUGGABLEFGeometry | MakeRoot
(
const UE::Slate::FDeprecateVector2DParameter& InLocalSize, |
Makes a new geometry that is essentially the root of a hierarchy (has no parent transforms to inherit). | |
| FORCEINLINE_DEBUGGABLEFPaintGeometry | 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. | |
| FORCEINLINE_DEBUGGABLEFPaintGeometry | 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. | |
| FORCEINLINE_DEBUGGABLEFPaintGeometry | Create a paint geometry that represents this geometry. | ||
| FORCEINLINE_DEBUGGABLEFPaintGeometry | ToPaintGeometry
(
const FSlateLayoutTransform& LayoutTransform |
Create a paint geometry with the same size as this geometry with a given layout transform. | |
| FORCEINLINE_DEBUGGABLEFPaintGeometry | ToPaintGeometry
(
const UE::Slate::FDeprecateVector2DParameter& InLocalSize, |
Create a paint geometry relative to this one with a given local space size and layout transform. | |
| FORCEINLINE_DEBUGGABLEFPaintGeometry | ToPaintGeometry
(
const UE::Slate::FDeprecateVector2DParameter& InLocalSize, |
Create a paint geometry relative to this one with a given local space size and layout transform. | |
| FString | ToString () |
Operators
| Type | Name | Description | |
|---|---|---|---|
| bool | operator!=
(
const FGeometry& Other |
Test geometries for strict inequality (i.e. exact float equality negated). | |
| FGeometry & | !!! HACK!!! We're keeping members of FGeometry const to prevent mutability without making them private, for backward compatibility. | ||
| bool | operator==
(
const FGeometry& Other |
Test geometries for strict equality (i.e. exact float equality). |