UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Anchors.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "Anchors.generated.h"
8
12USTRUCT(BlueprintType)
14{
16
17
18 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Appearance)
20
22 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Appearance)
24
25public:
26
33 : Minimum(0.0f, 0.0f)
34 , Maximum(0.0f, 0.0f)
35 { }
36
42
48
50 FAnchors(float MinX, float MinY, float MaxX, float MaxY)
51 : Minimum(MinX, MinY)
52 , Maximum(MaxX, MaxY)
53 { }
54
61 bool operator==(const FAnchors& Other) const
62 {
63 return Minimum == Other.Minimum && Maximum == Other.Maximum;
64 }
65
72 bool operator!=(const FAnchors& Other) const
73 {
74 return !(*this == Other);
75 }
76
78 bool IsStretchedVertical() const { return Minimum.Y != Maximum.Y; }
79
81 bool IsStretchedHorizontal() const { return Minimum.X != Maximum.X; }
82};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
Definition Anchors.h:14
FAnchors(float Horizontal, float Vertical)
Definition Anchors.h:44
bool IsStretchedHorizontal() const
Definition Anchors.h:81
bool operator!=(const FAnchors &Other) const
Definition Anchors.h:72
FAnchors(float MinX, float MinY, float MaxX, float MaxY)
Definition Anchors.h:50
bool IsStretchedVertical() const
Definition Anchors.h:78
FAnchors(float UnifromAnchors)
Definition Anchors.h:38
bool operator==(const FAnchors &Other) const
Definition Anchors.h:61