Back to Website
Show / Hide Table of Contents

Class RectangleF

Package: @aurigma/design-atoms-model

Constructors

(constructor)(left, top, width, height)

Constructs a new instance of the RectangleF class

Declaration
constructor(left?: number, top?: number, width?: number, height?: number);
Parameters
Type Name Description
number left
number top
number width
number height

Properties

_propertyChanged

Declaration
protected _propertyChanged: EventWithSenderArg<RectangleF, string>;
Property Value
Type Description
EventWithSenderArg<RectangleF, string>

bottom

Declaration
set bottom(value: number);
Property Value
Type Description
number

center

Declaration
get center(): PointF;
Property Value
Type Description
PointF

empty

Declaration
static get empty(): RectangleF;
Property Value
Type Description
RectangleF

height

Declaration
get height(): number;

set height(value: number);
Property Value
Type Description
number

id

Declaration
get id(): any;
Property Value
Type Description
any

left

Declaration
get left(): number;

set left(value: number);
Property Value
Type Description
number

right

Declaration
set right(value: number);
Property Value
Type Description
number

top

Declaration
get top(): number;

set top(value: number);
Property Value
Type Description
number

width

Declaration
get width(): number;

set width(value: number);
Property Value
Type Description
number

Methods

addPropertyChanged(listener)

Declaration
addPropertyChanged(listener: (sender: RectangleF, eventArgs: string) => void): void;
Parameters
Type Name Description
(sender: RectangleF, eventArgs: string) => void listener
Returns
Type Description
void

clone()

Declaration
clone(): RectangleF;
Returns
Type Description
RectangleF

contains(point, includeBorder, tolerance)

Declaration
contains(point: PointF, includeBorder?: boolean, tolerance?: number): boolean;
Parameters
Type Name Description
PointF point
boolean includeBorder
number tolerance
Returns
Type Description
boolean

containsRectangle(rectangle)

Declaration
containsRectangle(rectangle: RectangleF): boolean;
Parameters
Type Name Description
RectangleF rectangle
Returns
Type Description
boolean

equals(other)

Declaration
equals(other: RectangleF): boolean;
Parameters
Type Name Description
RectangleF other
Returns
Type Description
boolean

FromLTRB(left, top, right, bottom)

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

fromLtrbObject(obj)

Declaration
static fromLtrbObject(obj: ILtrb): RectangleF;
Parameters
Type Name Description
ILtrb obj
Returns
Type Description
RectangleF

FromObject(object)

Declaration
static FromObject(object: {
        left: number;
        top: number;
        width: number;
        height: number;
    }): RectangleF;
Parameters
Type Name Description
{ left: number; top: number; width: number; height: number; } object
Returns
Type Description
RectangleF

fromPoints(point1, point2)

Declaration
static fromPoints(point1: PointF, point2: PointF): RectangleF;
Parameters
Type Name Description
PointF point1
PointF point2
Returns
Type Description
RectangleF

fromString(str)

Declaration
static fromString(str: string): RectangleF;
Parameters
Type Name Description
string str
Returns
Type Description
RectangleF

getExpanded(margin)

Declaration
getExpanded(margin: ILtrb): RectangleF;
Parameters
Type Name Description
ILtrb margin
Returns
Type Description
RectangleF

getMatrix(initialRect, targetRect)

Declaration
static getMatrix(initialRect: RectangleF, targetRect: RectangleF): Matrix;
Parameters
Type Name Description
RectangleF initialRect
RectangleF targetRect
Returns
Type Description
Matrix

getOverallBounds(rects)

Declaration
static getOverallBounds(rects: RectangleF[]): RectangleF;
Parameters
Type Name Description
RectangleF[] rects
Returns
Type Description
RectangleF

inflate(size)

Declaration
inflate(size: number): void;
Parameters
Type Name Description
number size
Returns
Type Description
void

intersect(a, b)

Creates a rectangle that represents the intersetion between a and b. If there is no intersection, empty rectangle is returned.

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

intersectsWith(rect)

Determines if this rectangle intersects with rect

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

isEmpty()

Declaration
isEmpty(): boolean;
Returns
Type Description
boolean

isEqual(a, b, tolerance)

Declaration
static isEqual(a: RectangleF, b: RectangleF, tolerance?: number): boolean;
Parameters
Type Name Description
RectangleF a
RectangleF b
number tolerance
Returns
Type Description
boolean

removePropertyChanged(listener)

Declaration
removePropertyChanged(listener: (sender: RectangleF, eventArgs: string) => void): void;
Parameters
Type Name Description
(sender: RectangleF, eventArgs: string) => void listener
Returns
Type Description
void

toJSON()

Declaration
toJSON(): {
        left: number;
        top: number;
        width: number;
        height: number;
        id: any;
    };
Returns
Type Description
{ left: number; top: number; width: number; height: number; id: any; }

toString()

Declaration
toString(): string;
Returns
Type Description
string

union(a, b)

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

updateByMatrix(matrix)

Declaration
updateByMatrix(matrix: Matrix): this;
Parameters
Type Name Description
Matrix matrix
Returns
Type Description
this
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