Back to Website
Show / Hide Table of Contents

Class RotatedRectangleF

Package: @aurigma/design-atoms-model

Constructors

(constructor)(centerX, centerY, width, height, angle)

Constructs a new instance of the RotatedRectangleF class

Declaration
constructor(centerX?: number, centerY?: number, width?: number, height?: number, angle?: number);
Parameters
Type Name Description
number centerX
number centerY
number width
number height
number angle

Properties

angle

Declaration
angle: number;
Property Value
Type Description
number

bounds

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

Declaration
get bounds(): RectangleF;
Property Value
Type Description
RectangleF

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

center

Declaration
get center(): PointF;

set center(center: PointF);
Property Value
Type Description
PointF

centerX

Declaration
centerX: number;
Property Value
Type Description
number

centerY

Declaration
centerY: number;
Property Value
Type Description
number

height

Declaration
height: number;
Property Value
Type Description
number

location

Declaration
get location(): PointF;

set location(location: PointF);
Property Value
Type Description
PointF

width

Declaration
width: number;
Property Value
Type Description
number

Methods

clone()

Declaration
clone(): RotatedRectangleF;
Returns
Type Description
RotatedRectangleF

contains(pt)

Declaration
contains(pt: PointF): boolean;
Parameters
Type Name Description
PointF pt
Returns
Type Description
boolean

equals(rect, tolerance)

Declaration
equals(rect: RotatedRectangleF, tolerance?: number): boolean;
Parameters
Type Name Description
RotatedRectangleF rect
number tolerance
Returns
Type Description
boolean

FromLTRB(left, top, right, bottom)

Declaration
static FromLTRB(left: number, top: number, right: number, bottom: number): RotatedRectangleF;
Parameters
Type Name Description
number left
number top
number right
number bottom
Returns
Type Description
RotatedRectangleF

fromRectangleF(rectangle, angle)

Declaration
static fromRectangleF(rectangle: RectangleF, angle?: number): RotatedRectangleF;
Parameters
Type Name Description
RectangleF rectangle
number angle
Returns
Type Description
RotatedRectangleF

getBottomCenterPoint()

Declaration
getBottomCenterPoint(): PointF;
Returns
Type Description
PointF

getBottomLeftCorner()

Declaration
getBottomLeftCorner(): PointF;
Returns
Type Description
PointF

getBottomRightCorner()

Declaration
getBottomRightCorner(): PointF;
Returns
Type Description
PointF

getCornerByIndex(index)

Declaration
getCornerByIndex(index: number): PointF;
Parameters
Type Name Description
number index
Returns
Type Description
PointF

getLeftCenterPoint()

Declaration
getLeftCenterPoint(): PointF;
Returns
Type Description
PointF

getRectWithOffset(rectangle, offset)

Declaration
static getRectWithOffset(rectangle: RotatedRectangleF, offset: PointF): RotatedRectangleF;
Parameters
Type Name Description
RotatedRectangleF rectangle
PointF offset
Returns
Type Description
RotatedRectangleF

getRightCenterPoint()

Declaration
getRightCenterPoint(): PointF;
Returns
Type Description
PointF

getSimplifiedObject()

Declaration
getSimplifiedObject(): {
        centerX: number;
        centerY: number;
        width: number;
        height: number;
        angle: number;
    };
Returns
Type Description
{ centerX: number; centerY: number; width: number; height: number; angle: number; }

getTransform(rectangle)

Declaration
getTransform(rectangle: RotatedRectangleF): Transform;
Parameters
Type Name Description
RotatedRectangleF rectangle
Returns
Type Description
Transform

getUpperCenterPoint()

Declaration
getUpperCenterPoint(): PointF;
Returns
Type Description
PointF

getUpperLeftCorner()

Declaration
getUpperLeftCorner(): PointF;
Returns
Type Description
PointF

getUpperRightCorner()

Declaration
getUpperRightCorner(): PointF;
Returns
Type Description
PointF

intersect(a, b)

Declaration
static intersect(a: RotatedRectangleF, b: RotatedRectangleF): RotatedRectangleF;
Parameters
Type Name Description
RotatedRectangleF a
RotatedRectangleF b
Returns
Type Description
RotatedRectangleF

intersectsWith(rect)

Declaration
intersectsWith(rect: RotatedRectangleF): boolean;
Parameters
Type Name Description
RotatedRectangleF rect
Returns
Type Description
boolean

rotateAt(angle, center)

Declaration
rotateAt(angle: number, center: PointF): this;
Parameters
Type Name Description
number angle
PointF center
Returns
Type Description
this

setTransform(transform)

Declaration
setTransform(transform: Transform): void;
Parameters
Type Name Description
Transform transform
Returns
Type Description
void

toRectangleF()

Declaration
toRectangleF(): RectangleF;
Returns
Type Description
RectangleF

toString()

Declaration
toString(): string;
Returns
Type Description
string

transform(transform, center)

Declaration
transform(transform: Transform, center: PointF): void;
Parameters
Type Name Description
Transform transform
PointF center
Returns
Type Description
void

transformByMatrix(matrix, deltaAngle)

Declaration
transformByMatrix(matrix: Matrix, deltaAngle?: number): RotatedRectangleF;
Parameters
Type Name Description
Matrix matrix
number deltaAngle
Returns
Type Description
RotatedRectangleF

translate(x, y)

Declaration
translate(x: number, y: number): void;
Parameters
Type Name Description
number x
number y
Returns
Type Description
void

union(a, b)

Declaration
static union(a: RotatedRectangleF, b: RotatedRectangleF): RotatedRectangleF;
Parameters
Type Name Description
RotatedRectangleF a
RotatedRectangleF b
Returns
Type Description
RotatedRectangleF

withoutAngle()

Declaration
withoutAngle(): RotatedRectangleF;
Returns
Type Description
RotatedRectangleF
Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2025 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback