Class: RectGeometry
component.RectGeometry
classdesc Represents a rectangle geometry in the 2D basic image coordinate system.
example
var basicRect = [0.5, 0.3, 0.7, 0.4];var rectGeometry = new RectGeometry(basicRect);Hierarchy#
- ↳ - RectGeometry
Constructors#
constructor#
• new RectGeometry(rect)
Create a rectangle geometry.
throws {GeometryTagError} Rectangle coordinates must be valid basic coordinates.
Parameters#
| Name | Type | Description | 
|---|---|---|
| rect | number[] | An array representing the top-left and bottom-right corners of the rectangle in basic coordinates. Ordered according to [x0, y0, x1, y1]. | 
Overrides#
VertexGeometry.constructor
Defined in#
component/tag/geometry/RectGeometry.ts:31
Accessors#
rect#
• get rect(): number[]
Get rect property.
Returns#
number[]
Array representing the top-left and bottom-right corners of the rectangle in basic coordinates.