FIntRect

Structure for integer rectangles in 2-d space.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Math/IntRect.h

Include

#include "Math/IntRect.h"

Syntax

struct FIntRect

Remarks

Structure for integer rectangles in 2-d space.

Variables

Name Description

Public variable

FIntPoint

 

Max

Holds the last pixel line/row (like in Win32 RECT).

Public variable

FIntPoint

 

Min

Holds the first pixel line/row (like in Win32 RECT).

Constructors

Name Description

Public function

FIntRect()

Constructor

FIntRect inline functions

Public function

FIntRect

(
    FIntPoint InMin,
    FIntPoint InMax
)

Constructor

Public function

FIntRect

(
    int32 X0,
    int32 Y0,
    int32 X1,
    int32 Y1
)

Constructor

Functions

Name Description

Public function Const

int32

 

Area()

Calculates the area of this rectangle.

Public function Const

FIntRect

 

Bottom

(
    int32 InHeight
)

Creates a rectangle from the bottom part of this rectangle.

Public function

void

 

Clip

(
    const FIntRect& Other
)

Clip a rectangle using the bounds of another rectangle.

Public function Const

bool

 

Contains

(
    FIntPoint Point
)

Test whether this rectangle contains a point.

Public function Static

FIntRect

 

DivideAndRoundUp

(
    FIntRect lhs,
    int32 Div
)

Divides a rectangle and rounds up to the nearest integer.

Public function Static

FIntRect

 

DivideAndRoundUp

(
    FIntRect lhs,
    FIntPoint Div
)

Divides a rectangle and rounds up to the nearest integer.

Public function Const

void

 

GetCenterAndExtents

(
    FIntPoint& OutCenter,
    FIntPoint& OutExtent
)

Gets the Center and Extents of this rectangle.

Public function Const

int32

 

Height()

Gets the Height of the rectangle.

Public function

void

 

Include

(
    FIntPoint Point
)

Adds to this rectangle to include a given point.

Public function

void

 

InflateRect

(
    int32 Amount
)

Inflates or deflates the rectangle.

Public function Const

FIntRect

 

Inner

(
    FIntPoint Shrink
)

Gets a new rectangle from the inner of this one.

Public function Const

bool

 

IsEmpty()

Returns true if the rectangle is 0 x 0.

Public function Static

int32

 

Num()

Gets number of points in the Rectangle.

Public function Const

FIntRect

 

Right

(
    int32 InWidth
)

Creates a rectangle from the right hand side of this rectangle.

Public function Const

FIntRect

 

Scale

(
    float Fraction
)

Scales a rectangle using a floating point number.

Public function Const

FIntPoint

 

Size()

Gets the distance from one corner of the rectangle to the other.

Public function Const

FString

 

ToString()

Get a textual representation of this rectangle.

Public function

void

 

Union

(
    const FIntRect& Other
)

Combines the two rectanges.

Public function Const

int32

 

Width()

Gets the width of the rectangle.

Operators

Name Description

Public function Const

FIntRect

 

operator-

(
    const FIntRect& Other
)

Gets the result of subtracting a rectangle from this one.

Public function Const

FIntRect

 

operator-

(
    const FIntPoint& Point
)

Gets the result of subtracting a point from this rectangle.

Public function Const

bool

 

operator!=

(
    const FIntRect& Other
)

Compares Rectangles for inequality.

Public function

FIntPoint &

 

operator()

(
    int32 PointIndex
)

Gets a specific point in this rectangle.

Public function Const

const FIntPo...

 

operator()

(
    int32 PointIndex
)

Gets a specific point in this rectangle.

Public function Const

FIntRect

 

operator*

(
    int32 Scale
)

Gets the result of scaling on this rectangle.

Public function

FIntRect &

 

operator*=

(
    int32 Scale
)

Applies scaling to this rectangle.

Public function Const

FIntRect

 

operator/

(
    const FIntPoint& Point
)

Gets the result of dividing a point with this rectangle.

Public function Const

FIntRect

 

operator/

(
    int32 Div
)

Gets the result of division on this rectangle.

Public function Const

FIntRect

 

operator+

(
    const FIntRect& Other
)

Gets the result of adding two rectangles together.

Public function Const

FIntRect

 

operator+

(
    const FIntPoint& Point
)

Gets the result of adding a point to this rectangle.

Public function

FIntRect &

 

operator+=

(
    const FIntPoint& Point
)

Adds a point to this rectangle.

Public function

FIntRect &

 

operator-=

(
    const FIntPoint& Point
)

Subtracts a point from this rectangle.

Public function Const

bool

 

operator==

(
    const FIntRect& Other
)

Compares Rectangles for equality.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss