Language:
Discover
By Skill Level
By Category

# FIntRect

Syntax

struct FIntRect

Remarks

Structure for integer rectangles in 2-d space.

Variables

Name Description

Max

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

Min

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

Constructors

Name Description

FIntRect()

Constructor

FIntRect inline functions

FIntRect

(
FIntPoint InMin,
FIntPoint InMax
)

Constructor

FIntRect

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

Constructor

Functions

Name Description

Area()

Calculates the area of this rectangle.

The area of this rectangle.

Bottom

(
int32 InHeight
)

Creates a rectangle from the bottom part of this rectangle.

The new rectangle.

void

Clip

(
const FIntRect & Other
)

Clip a rectangle using the bounds of another rectangle.

bool

Contains

(
FIntPoint Point
)

Test whether this rectangle contains a point.

DivideAndRoundUp

(
FIntRect lhs,
int32 Div
)

Divides a rectangle and rounds up to the nearest integer.

New divided rectangle.

DivideAndRoundUp

(
FIntRect lhs,
FIntPoint Div
)

void

GetCenterAndExtents

(
FIntPoint & OutCenter,
FIntPoint & OutExtent
)

Gets the Center and Extents of this rectangle.

Height()

Gets the Height of the rectangle.

The Height of the rectangle.

void

Include

(
FIntPoint Point
)

Adds to this rectangle to include a given point.

void

InflateRect

(
int32 Amount
)

Inflates or deflates the rectangle.

Inner

(
FIntPoint Shrink
)

Gets a new rectangle from the inner of this one.

New inner Rectangle.

bool

IsEmpty()

Returns true if the rectangle is 0 x 0.

true if the rectangle is 0 x 0.

Num()

Gets number of points in the Rectangle.

Number of points in the Rectangle.

Right

(
int32 InWidth
)

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

The new rectangle.

Scale

(
float Fraction
)

Scales a rectangle using a floating point number.

New scaled rectangle.

Size()

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

ToString()

Get a textual representation of this rectangle.

A string describing the rectangle.

void

Union

(
const FIntRect & Other
)

Combines the two rectanges.

Width()

Gets the width of the rectangle.

The width of the rectangle.

Operators

Name Description

operator-

(
const FIntRect & Other
)

Gets the result of subtracting a rectangle from this one.

operator-

(
const FIntPoint & Point
)

Gets the result of subtracting a point from this rectangle.

bool

operator!=

(
const FIntRect & Other
)

Compares Rectangles for inequality.

true if the rectangles are not equal, false otherwise..

operator()

(
int32 PointIndex
)

Gets a specific point in this rectangle.

Reference to point in rectangle.

const FIntPo ...

operator()

(
int32 PointIndex
)

Gets a specific point in this rectangle.

Const reference to point in rectangle.

operator*

(
int32 Scale
)

Gets the result of scaling on this rectangle.

New scaled rectangle.

operator*=

(
int32 Scale
)

Applies scaling to this rectangle.

Reference to this rectangle after scaling.

operator/

(
const FIntPoint & Point
)

Gets the result of dividing a point with this rectangle.

New rectangle with point divided.

operator/

(
int32 Div
)

Gets the result of division on this rectangle.

New divided rectangle.

operator+

(
const FIntRect & Other
)

Gets the result of adding two rectangles together.

New rectangle after both are added together.

operator+

(
const FIntPoint & Point
)

Gets the result of adding a point to this rectangle.

New rectangle with point added to it.

operator+=

(
const FIntPoint & Point
)

Adds a point to this rectangle.

Reference to this rectangle after addition.

operator-=

(
const FIntPoint & Point
)

Subtracts a point from this rectangle.

Reference to this rectangle after subtraction.

bool

operator==

(
const FIntRect & Other
)

Compares Rectangles for equality.

true if the rectangles are equal, false otherwise..

References