![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <SlateRect.h>
Static Public Member Functions | |
| static FSlateRect | FromPointAndExtent (const UE::Slate::FDeprecateVector2DParameter &TopLeft, const UE::Slate::FDeprecateVector2DParameter &Size) |
| static bool | DoRectanglesIntersect (const FSlateRect &A, const FSlateRect &B) |
| static bool | IsRectangleContained (const FSlateRect &A, const FSlateRect &B) |
Public Attributes | |
| float | Left |
| float | Top |
| float | Right |
| float | Bottom |
Friends | |
| FSlateRect | operator+ (const FSlateRect &A, const FSlateRect &B) |
| FSlateRect | operator- (const FSlateRect &A, const FSlateRect &B) |
| FSlateRect | operator* (float Scalar, const FSlateRect &Rect) |
| uint32 | GetTypeHash (const FSlateRect &Key) |
A rectangle defined by upper-left and lower-right corners.
Assumes a "screen-like" coordinate system where the origin is in the top-left, with the Y-axis going down. Functions like "contains" etc will not work with other conventions.
+---------> X | | (Left,Top) | o----o | | | | o----o | (Right, Bottom) \/ Y
|
inlineexplicit |
|
inline |
|
inline |
Returns whether or not a point is inside the rectangle
| Point | The point to check |
|
inlinestatic |
Do rectangles A and B intersect?
|
inline |
Returns the rect that encompasses both rectangles
| Other | The other rectangle |
|
inline |
Return a rectangle that is extended on each side by the amount specified in each margin.
| ExtendAmount | The amount to extend the geometry. |
|
inlinestatic |
Creates a rect from a top left point and extent. Provided as a factory function to not conflict with the TopLeft + BottomRight ctor.
|
inline |
|
inline |
Returns the bottom-left position of the rectangle
|
inline |
|
inline |
Returns the bottom-right position of the rectangle
|
inline |
|
inline |
Returns the center of the rectangle
|
inline |
|
inline |
Returns the size of the rectangle in each dimension.
|
inline |
|
inline |
Returns the top-left position of the rectangle
|
inline |
|
inline |
Returns the top-right position of the rectangle
|
inline |
| bool FSlateRect::InitFromString | ( | const FString & | InSourceString | ) |
Returns a string of containing the coordinates of the rect
| InSourceString | A string containing the values to initialize this rect in format Left=Value Top=Value... |
|
inline |
Return a rectangle that is contracted on each side by the amount specified in each margin.
| InsetAmount | The amount to contract the geometry. |
|
inline |
Returns the rectangle that is the intersection of this rectangle and Other.
| Other | The other rectangle |
|
inline |
Returns the rectangle that is the intersection of this rectangle and Other, as well as if they were overlapping at all.
| Other | The other rectangle |
| OutOverlapping | [Out] Was there any overlap with the other rectangle. |
|
inline |
|
inlinestatic |
Is rectangle B contained within rectangle A?
|
inline |
Determines if the rectangle has positive dimensions.
|
inline |
Return a rectangle that is offset by the amount specified .
| OffsetAmount | The amount to contract the geometry. |
|
inline |
|
inline |
|
inline |
Rounds the Left, Top, Right and Bottom fields and returns a new FSlateRect with rounded components.
|
inline |
Return a rectangle that is scaled by the amount specified.
| ScaleBy | The amount to scale the geometry. |
| FString FSlateRect::ToString | ( | ) | const |
Returns a string of containing the coordinates of the rect
|
friend |
|
friend |
|
friend |
|
friend |
| float FSlateRect::Bottom |
| float FSlateRect::Left |
| float FSlateRect::Right |
| float FSlateRect::Top |