Stadium2d
See source codeTable of contents
- area
- bounds
- boundsVertices
- center
- config
- debugColor
- excludeFromShapeBounds
- ignore
- isClosed
- isEmptyLabel
- isFilled
- isInternal
- isLabel
- length
- vertices
- Properties
- Methods
- distanceToLineSegment
- distanceToPoint
- getArea
- getBounds
- getBoundsVertices
- getLength
- getSvgPathData
- getVertices
- hitTestLineSegment
- hitTestPoint
- interpolateAlongEdge
- intersectCircle
- intersectLineSegment
- intersectPolygon
- intersectPolyline
- isExcludedByFilter
- isPointInBounds
- nearestPoint
- overlapsPolygon
- toSimpleSvgPath
- transform
- uninterpolateAlongEdge
Extends Geometry2d.
class Stadium2d extends Geometry2d {}Constructor
Constructs a new instance of the Stadium2d class
Parameters
| Name | Description |
|---|---|
| |
Properties
area
readonly
from Geometry2d
get area(): numberbounds
readonly
from Geometry2d
get bounds(): BoxboundsVertices
readonly
from Geometry2d
get boundsVertices(): Vec[]center
readonly
from Geometry2d
get center(): Vecconfig
config: Omit<Geometry2dOptions, 'isClosed'> & {
height: number
width: number
}debugColor
optional
from Geometry2d
debugColor?: stringexcludeFromShapeBounds
from Geometry2d
excludeFromShapeBounds: booleanignore
optional
from Geometry2d
ignore?: booleanisClosed
from Geometry2d
isClosed: booleanisEmptyLabel
from Geometry2d
isEmptyLabel: booleanisFilled
from Geometry2d
isFilled: booleanisInternal
from Geometry2d
isInternal: booleanisLabel
from Geometry2d
isLabel: booleanlength
readonly
from Geometry2d
get length(): numbervertices
readonly
from Geometry2d
get vertices(): Vec[]Methods
distanceToLineSegment( )
from Geometry2d
distanceToLineSegment(
A: VecLike,
B: VecLike,
filters?: Geometry2dFilters
): numberParameters
| Name | Description |
|---|---|
| |
| |
|
Returns
numberdistanceToPoint( )
from Geometry2d
distanceToPoint(
point: VecLike,
hitInside?: boolean,
filters?: Geometry2dFilters
): numberParameters
| Name | Description |
|---|---|
| |
| |
|
Returns
numbergetArea( )
from Geometry2d
getArea(): numbergetBounds( )
getBounds(): BoxgetBoundsVertices( )
from Geometry2d
getBoundsVertices(): Vec[]getLength( )
getLength(): numbergetSvgPathData( )
getSvgPathData(): stringgetVertices( )
getVertices(): Vec[]hitTestLineSegment( )
Parameters
Returns
booleanhitTestPoint( )
from Geometry2d
hitTestPoint(
point: VecLike,
margin?: number,
hitInside?: boolean,
_filters?: Geometry2dFilters
): booleanParameters
| Name | Description |
|---|---|
| |
| |
| |
|
Returns
booleaninterpolateAlongEdge( )
from Geometry2d
Find a point along the edge of the geometry that is a fraction t along the entire way round.
interpolateAlongEdge(t: number, _filters?: Geometry2dFilters): VecParameters
| Name | Description |
|---|---|
| |
|
Returns
intersectCircle( )
from Geometry2d
intersectCircle(
center: VecLike,
radius: number,
_filters?: Geometry2dFilters
): VecLike[]Parameters
| Name | Description |
|---|---|
| |
| |
|
Returns
VecLike[]intersectLineSegment( )
from Geometry2d
intersectLineSegment(
A: VecLike,
B: VecLike,
_filters?: Geometry2dFilters
): VecLike[]Parameters
| Name | Description |
|---|---|
| |
| |
|
Returns
VecLike[]intersectPolygon( )
from Geometry2d
intersectPolygon(polygon: VecLike[], _filters?: Geometry2dFilters): VecLike[]Parameters
| Name | Description |
|---|---|
| |
|
Returns
VecLike[]intersectPolyline( )
from Geometry2d
intersectPolyline(
polyline: VecLike[],
_filters?: Geometry2dFilters
): VecLike[]Parameters
| Name | Description |
|---|---|
| |
|
Returns
VecLike[]isExcludedByFilter( )
from Geometry2d
isExcludedByFilter(filters?: Geometry2dFilters): booleanParameters
| Name | Description |
|---|---|
|
Returns
booleanisPointInBounds( )
from Geometry2d
isPointInBounds(point: VecLike, margin?: number): booleanParameters
| Name | Description |
|---|---|
| |
| |
Returns
booleannearestPoint( )
Parameters
| Name | Description |
|---|---|
|
Returns
overlapsPolygon( )
from Geometry2d
overlapsPolygon(_polygon: VecLike[]): booleanParameters
| Name | Description |
|---|---|
| |
Returns
booleantoSimpleSvgPath( )
from Geometry2d
toSimpleSvgPath(): stringtransform( )
from Geometry2d
transform(
transform: MatModel,
opts?: TransformedGeometry2dOptions
): Geometry2dParameters
| Name | Description |
|---|---|
| |
|
Returns
uninterpolateAlongEdge( )
from Geometry2d
Take point, find the closest point to it on the edge of the geometry, and return how far
along the edge it is as a fraction of the total length.
uninterpolateAlongEdge(point: VecLike, _filters?: Geometry2dFilters): numberParameters
| Name | Description |
|---|---|
| |
|
Returns
numberPrev
SnapManagerNext
StateNode