Rectangle2d
See source codeTable of contents
Extends Polygon2d.
class Rectangle2d extends Polygon2d {}Constructor
Constructs a new instance of the Rectangle2d class
Parameters
| Name | Description |
|---|---|
| |
Properties
area
readonly
from Geometry2d
get area(): numberbounds
readonly
from Geometry2d
get bounds(): Boxcenter
readonly
from Geometry2d
get center(): VecdebugColor
optional
from Geometry2d
debugColor?: stringh
h: numberignore
optional
from Geometry2d
ignore?: booleanisClosed
from Geometry2d
isClosed: booleanisFilled
from Geometry2d
isFilled: booleanisLabel
from Geometry2d
isLabel: booleanlength
readonly
from Geometry2d
get length(): numberpoints
from Polyline2d
points: Vec[]segments
readonly
from Polyline2d
get segments(): Edge2d[]vertices
readonly
from Geometry2d
get vertices(): Vec[]w
w: numberx
x: numbery
y: numberMethods
distanceToLineSegment()
from Geometry2d
Parameters
Returns
numberdistanceToPoint()
from Geometry2d
distanceToPoint(point: Vec, hitInside?: boolean): numberParameters
| Name | Description |
|---|---|
| |
| |
Returns
numbergetArea()
from Geometry2d
getArea(): numbergetBounds()
getBounds(): BoxgetLength()
from Polyline2d
getLength(): numbergetSvgPathData()
getSvgPathData(): stringgetVertices()
from Polyline2d
getVertices(): Vec[]hitTestLineSegment()
from Polyline2d
Parameters
Returns
booleanhitTestPoint()
from Geometry2d
hitTestPoint(point: Vec, margin?: number, hitInside?: boolean): booleanParameters
| Name | Description |
|---|---|
| |
| |
| |
Returns
booleanisPointInBounds()
from Geometry2d
isPointInBounds(point: Vec, margin?: number): booleanParameters
| Name | Description |
|---|---|
| |
| |
Returns
booleannearestPoint()
from Polyline2d
Parameters
| Name | Description |
|---|---|
|
Returns
nearestPointOnLineSegment()
from Geometry2d
Parameters
Returns
toSimpleSvgPath()
from Geometry2d
toSimpleSvgPath(): stringPrev
ReadonlySharedStyleMapNext
ScribbleManager