Skip to main content

RotatedRectangleF

Classes​

RotatedRectangleF​

Constructors​

Constructor​
new RotatedRectangleF(
centerX?,
centerY?,
width?,
height?,
angle?): RotatedRectangleF;
Parameters​
ParameterType
centerX?number
centerY?number
width?number
height?number
angle?number
Returns​

RotatedRectangleF

Properties​

angle​
angle: number;
centerX​
centerX: number;
centerY​
centerY: number;
height​
height: number;
width​
width: number;

Accessors​

bounds​
Get Signature​
get bounds(): RectangleF;

Gets the bounds of this rotated rectangle taking into account its rotation.

Returns​

RectangleF

center​
Get Signature​
get center(): PointF;
Returns​

PointF

Set Signature​
set center(center): void;
Parameters​
ParameterType
centerPointF
Returns​

void

location​
Get Signature​
get location(): PointF;
Returns​

PointF

Set Signature​
set location(location): void;
Parameters​
ParameterType
locationPointF
Returns​

void

Methods​

clone()​
clone(): RotatedRectangleF;
Returns​

RotatedRectangleF

contains()​
contains(pt): boolean;
Parameters​
ParameterType
ptPointF
Returns​

boolean

equals()​
equals(rect, tolerance?): boolean;
Parameters​
ParameterType
rectRotatedRectangleF
tolerance?number
Returns​

boolean

getBottomCenterPoint()​
getBottomCenterPoint(): PointF;
Returns​

PointF

getBottomLeftCorner()​
getBottomLeftCorner(): PointF;
Returns​

PointF

getBottomRightCorner()​
getBottomRightCorner(): PointF;
Returns​

PointF

getCornerByIndex()​
getCornerByIndex(index): PointF;
Parameters​
ParameterType
indexnumber
Returns​

PointF

getLeftCenterPoint()​
getLeftCenterPoint(): PointF;
Returns​

PointF

getRightCenterPoint()​
getRightCenterPoint(): PointF;
Returns​

PointF

getSimplifiedObject()​
getSimplifiedObject(): object;
Returns​

object

angle​
angle: number;
centerX​
centerX: number;
centerY​
centerY: number;
height​
height: number;
width​
width: number;
getTransform()​
getTransform(rectangle): Transform;
Parameters​
ParameterType
rectangleRotatedRectangleF
Returns​

Transform

getUpperCenterPoint()​
getUpperCenterPoint(): PointF;
Returns​

PointF

getUpperLeftCorner()​
getUpperLeftCorner(): PointF;
Returns​

PointF

getUpperRightCorner()​
getUpperRightCorner(): PointF;
Returns​

PointF

intersectsWith()​
intersectsWith(rect): boolean;
Parameters​
ParameterType
rectRotatedRectangleF
Returns​

boolean

rotateAt()​
rotateAt(angle, center): RotatedRectangleF;
Parameters​
ParameterType
anglenumber
centerPointF
Returns​

RotatedRectangleF

setTransform()​
setTransform(transform): void;
Parameters​
ParameterType
transformTransform
Returns​

void

toRectangleF()​
toRectangleF(): RectangleF;
Returns​

RectangleF

toString()​
toString(): string;
Returns​

string

transform()​
transform(transform, center): void;
Parameters​
ParameterType
transformTransform
centerPointF
Returns​

void

transformByMatrix()​
transformByMatrix(matrix, deltaAngle?): RotatedRectangleF;
Parameters​
ParameterTypeDefault value
matrixMatrixundefined
deltaAnglenumbernull
Returns​

RotatedRectangleF

translate()​
translate(x, y): void;
Parameters​
ParameterType
xnumber
ynumber
Returns​

void

withoutAngle()​
withoutAngle(): RotatedRectangleF;
Returns​

RotatedRectangleF

FromLTRB()​
static FromLTRB(
left,
top,
right,
bottom): RotatedRectangleF;
Parameters​
ParameterType
leftnumber
topnumber
rightnumber
bottomnumber
Returns​

RotatedRectangleF

fromRectangleF()​
static fromRectangleF(rectangle, angle?): RotatedRectangleF;
Parameters​
ParameterType
rectangleRectangleF
angle?number
Returns​

RotatedRectangleF

getRectWithOffset()​
static getRectWithOffset(rectangle, offset): RotatedRectangleF;
Parameters​
ParameterType
rectangleRotatedRectangleF
offsetPointF
Returns​

RotatedRectangleF

intersect()​
static intersect(a, b): RotatedRectangleF;
Parameters​
ParameterType
aRotatedRectangleF
bRotatedRectangleF
Returns​

RotatedRectangleF

union()​
static union(a, b): RotatedRectangleF;
Parameters​
ParameterType
aRotatedRectangleF
bRotatedRectangleF
Returns​

RotatedRectangleF

Was this page helpful?