Bounds
Extends:
Represents a rectangular area in pixel coordinates
Constructor Summary
Public Constructor | ||
public |
constructor(topLeft: Point, bottomRight: Point) Constructor |
Method Summary
Public Methods | ||
public |
Returns true if the rectangle contains the given one |
|
public |
Extends the bounds to contain the given point |
|
public |
Returns the bottom-left point of the bounds |
|
public |
Returns the center point of the bounds |
|
public |
Returns the size of the given bounds |
|
public |
getTopRight(): Point Returns the top-right point of the bounds |
|
public |
intersects(otherBounds: Bounds): Boolean Returns true if the rectangle intersects the given bounds. |
|
public |
Returns true if the rectangle overlaps the given bounds. |
Public Constructors
Public Methods
public contains(point: Point | Bounds): Boolean source
Returns true if the rectangle contains the given one
public extend(point: Point): Bounds source
Extends the bounds to contain the given point
Params:
Name | Type | Attribute | Description |
point | Point | extends area |
public getCenter(isRound: Boolean): Point source
Returns the center point of the bounds
Params:
Name | Type | Attribute | Description |
isRound | Boolean |
|
if isRound is true, round the point |