Navigation
Unreal Engine C++ API Reference > Runtime > SlateCore > Layout
References
Module | SlateCore |
Header | /Engine/Source/Runtime/SlateCore/Public/Layout/Geometry.h |
Include | #include "Layout/Geometry.h" |
Syntax
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 | |
---|---|---|---|
![]() ![]() |
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. |
![]() |
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 & | ||
![]() ![]() |
UE::Slate::FDeprecateVector2DResult | GetDrawSize () |
!!! DEPRECATED !!! This legacy function does not account for render transforms. |
![]() ![]() |
FSlateRect | GetLayoutBoundingRect
(
const FSlateRect& LocalSpaceRect |
|
![]() ![]() |
FSlateRect | GetLayoutBoundingRect
(
const FMargin& LocalSpaceExtendBy |
|
![]() ![]() |
FSlateRect | ||
![]() ![]() |
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 () |
|
![]() ![]() |
FSlateRect | GetRenderBoundingRect
(
const FSlateRect& LocalSpaceRect |
|
![]() ![]() |
FSlateRect | GetRenderBoundingRect
(
const FMargin& LocalSpaceExtendBy |
|
![]() ![]() |
FSlateRect | ||
![]() ![]() |
bool | ||
![]() ![]() |
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. |
![]() ![]() |
UE::Slate::FDeprecateVector2DResult | LocalToAbsolute
(
UE::Slate::FDeprecateVector2DParameter LocalCoordinate |
Translates local coordinates into absolute coordinates |
![]() ![]() |
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. |
![]() ![]() |
FArrangedWidget | MakeChild
(
const TSharedRef< SWidget >& ChildWidget, |
FGeometry Arranged Widget Inlined Functions. |
![]() ![]() |
FGeometry | MakeChild
(
const FSlateRenderTransform& RenderTransform, |
|
![]() ![]() |
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. |
![]() ![]() |
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. |
![]() ![]() |
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. |
![]() ![]() |
FArrangedWidget | MakeChild
(
const TSharedRef< SWidget >& ChildWidget, |
Create a child geometry+widget relative to this one using the given LayoutGeometry. |
![]() ![]() |
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). |
![]() ![]() |
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). |
![]() ![]() |
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. |
![]() ![]() |
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. |
![]() ![]() |
FPaintGeometry | Create a paint geometry that represents this geometry. | |
![]() ![]() |
FPaintGeometry | ToPaintGeometry
(
const FSlateLayoutTransform& LayoutTransform |
Create a paint geometry with the same size as this geometry with a given layout transform. |
![]() ![]() |
FPaintGeometry | ToPaintGeometry
(
const UE::Slate::FDeprecateVector2DParameter& InLocalSize, |
Create a paint geometry relative to this one with a given local space size and layout transform. |
![]() ![]() |
FPaintGeometry | 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). |
Deprecated Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
FGeometry | MakeChild
(
const FVector2D& ChildOffset, |
Use FGeometry MakeChild(const FVector2f& InLocalSize, const FSlateLayoutTransform& InLayoutTransform) instead. |
![]() ![]() |
FPaintGeometry | ToPaintGeometry
(
const UE::Slate::FDeprecateVector2DParameter& InLocalOffset, |
Use FPaintGeometry ToPaintGeometry(const FVector2f& InLocalSize, const FSlateLayoutTransform& InLayoutTransform) instead. |