@aurigma/design-atoms-model
Version:
Design Atoms is a part of Customer's Canvas SDK which allows for manipulating individual design elements through your code.
56 lines (55 loc) • 2.22 kB
TypeScript
import { RectangleF } from "./RectangleF";
import { PointF } from "./PointF";
import { Transform } from "./Transform";
import { Matrix } from "./Matrix";
export declare class RotatedRectangleF {
centerX: number;
centerY: number;
width: number;
height: number;
angle: number;
constructor(centerX?: number, centerY?: number, width?: number, height?: number, angle?: number);
getSimplifiedObject(): {
centerX: number;
centerY: number;
width: number;
height: number;
angle: number;
};
clone(): RotatedRectangleF;
/**
* Gets the bounds of this rotated rectangle taking into account its rotation.
*/
get bounds(): RectangleF;
equals(rect: RotatedRectangleF, tolerance?: number): boolean;
getUpperLeftCorner(): PointF;
getUpperCenterPoint(): PointF;
getLeftCenterPoint(): PointF;
getRightCenterPoint(): PointF;
getUpperRightCorner(): PointF;
getBottomRightCorner(): PointF;
getBottomLeftCorner(): PointF;
getBottomCenterPoint(): PointF;
private _checkProjectionIntersection;
private _getProjections;
intersectsWith(rect: RotatedRectangleF): boolean;
get location(): PointF;
set location(location: PointF);
get center(): PointF;
set center(center: PointF);
rotateAt(angle: any, center: any): this;
translate(x: any, y: any): void;
setTransform(transform: Transform): void;
getTransform(rectangle: RotatedRectangleF): Transform;
transform(transform: Transform, center: PointF): void;
toString(): string;
toRectangleF(): RectangleF;
contains(pt: PointF): boolean;
getCornerByIndex(index: number): PointF;
transformByMatrix(matrix: Matrix, deltaAngle?: number): RotatedRectangleF;
withoutAngle(): RotatedRectangleF;
static union(a: RotatedRectangleF, b: RotatedRectangleF): RotatedRectangleF;
static fromRectangleF(rectangle: RectangleF, angle?: number): RotatedRectangleF;
static FromLTRB(left: number, top: number, right: number, bottom: number): RotatedRectangleF;
static getRectWithOffset(rectangle: RotatedRectangleF, offset: PointF): RotatedRectangleF;
}