A rectangle defined by upper-left and lower-right corners. 更多...
#include <SlateRect.h>
Public 成员函数 | |
| FORCEINLINE bool | ContainsPoint (const FVector2D &Point) const |
| Returns whether or not a point is inside the rectangle 更多... | |
| FORCEINLINE FSlateRect | Expand (const FSlateRect &Other) const |
| Returns the rect that encompasses both rectangles 更多... | |
| FORCEINLINE FSlateRect | ExtendBy (const FMargin &ExtendAmount) const |
| Return a rectangle that is extended on each side by the amount specified in each margin. 更多... | |
| FORCEINLINE FVector2D | GetBottomLeft () const |
| Returns the bottom-left position of the rectangle 更多... | |
| FORCEINLINE FVector2D | GetBottomRight () const |
| Returns the bottom-right position of the rectangle 更多... | |
| FORCEINLINE FVector2D | GetCenter () const |
| Returns the center of the rectangle 更多... | |
| FORCEINLINE FVector2D | GetSize () const |
| Returns the size of the rectangle. 更多... | |
| FORCEINLINE FVector2D | GetTopLeft () const |
| Returns the top-left position of the rectangle 更多... | |
| FORCEINLINE FVector2D | GetTopRight () const |
| Returns the top-right position of the rectangle 更多... | |
| bool | InitFromString (const FString &InSourceString) |
| Returns a string of containing the coordinates of the rect 更多... | |
| FORCEINLINE FSlateRect | InsetBy (const struct FMargin &InsetAmount) const |
| Return a rectangle that is contracted on each side by the amount specified in each margin. 更多... | |
| FORCEINLINE FSlateRect | IntersectionWith (const FSlateRect &Other) const |
| Returns the rectangle that is the intersection of this rectangle and Other. 更多... | |
| FSlateRect | IntersectionWith (const FSlateRect &Other, bool &OutOverlapping) const |
| Returns the rectangle that is the intersection of this rectangle and Other, as well as if they were overlapping at all. 更多... | |
| FORCEINLINE bool | IsEmpty () const |
| FORCEINLINE bool | IsValid () const |
| Determines if the rectangle has positive dimensions. | |
| FORCEINLINE FSlateRect | OffsetBy (const FVector2D &OffsetAmount) const |
| Return a rectangle that is offset by the amount specified . 更多... | |
| FORCEINLINE FSlateRect | Round () const |
| Rounds the Left, Top, Right and Bottom fields and returns a new FSlateRect with rounded components. | |
| FORCEINLINE FSlateRect | ScaleBy (float ScaleBy) const |
| Return a rectangle that is scaled by the amount specified. 更多... | |
| FString | ToString () const |
| Returns a string of containing the coordinates of the rect 更多... | |
静态 Public 成员函数 | |
| static bool | DoRectanglesIntersect (const FSlateRect &A, const FSlateRect &B) |
| Do rectangles A and B intersect? | |
| static FSlateRect | FromPointAndExtent (const FVector2D &TopLeft, const FVector2D &Size) |
| Creates a rect from a top left point and extent. 更多... | |
| static FORCEINLINE bool | IsRectangleContained (const FSlateRect &A, const FSlateRect &B) |
| Is rectangle B contained within rectangle A? | |
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
|
inline |
Returns whether or not a point is inside the rectangle
| Point | The point to check |
|
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 |
Returns the bottom-left position of the rectangle
|
inline |
Returns the bottom-right position of the rectangle
|
inline |
Returns the center of the rectangle
|
inline |
Returns the size of the rectangle.
|
inline |
Returns the top-left position of the rectangle
|
inline |
Returns the top-right position of the rectangle
| 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 |
|
inline |
Return a rectangle that is offset by the amount specified .
| OffsetAmount | The amount to contract the geometry. |
|
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