Arc2d
Table of contents
- area
- bounds
- boundsVertices
- center
- debugColor
- excludeFromShapeBounds
- ignore
- isClosed
- isEmptyLabel
- isFilled
- isInternal
- isLabel
- length
- vertices
- Properties
- Methods
- distanceToLineSegment
- distanceToPoint
- getArea
- getBounds
- getBoundsVertices
- getLength
- getSvgPathData
- getVertices
- hitTestLineSegment
- hitTestPoint
- ignoreHit
- interpolateAlongEdge
- intersectCircle
- intersectLineSegment
- intersectPolygon
- intersectPolyline
- isExcludedByFilter
- isPointInBounds
- nearestPoint
- overlapsPolygon
- toSimpleSvgPath
- transform
- uninterpolateAlongEdge
Extends Geometry2d.
class Arc2d extends Geometry2d {}Constructor
Constructs a new instance of the Arc2d class
Parameters
| Name | Description |
|---|---|
| |
Properties
area
readonly
from Geometry2d
get area(): number;bounds
readonly
from Geometry2d
get bounds(): Box;boundsVertices
readonly
from Geometry2d
get boundsVertices(): Vec[];center
readonly
from Geometry2d
get center(): Vec;debugColor
optional
from Geometry2d
debugColor?: string;excludeFromShapeBounds
from Geometry2d
excludeFromShapeBounds: boolean;ignore
optional
from Geometry2d
ignore?: boolean;isClosed
from Geometry2d
isClosed: boolean;isEmptyLabel
from Geometry2d
isEmptyLabel: boolean;isFilled
from Geometry2d
isFilled: boolean;isInternal
from Geometry2d
isInternal: boolean;isLabel
from Geometry2d
isLabel: boolean;length
readonly
from Geometry2d
get length(): number;vertices
readonly
from Geometry2d
get vertices(): Vec[];Methods
distanceToLineSegment( )
from Geometry2d
distanceToLineSegment(
A: VecLike,
B: VecLike,
filters?: Geometry2dFilters,
): number;Parameters
| Name | Description |
|---|---|
| |
| |
|
Returns
number;distanceToPoint( )
from Geometry2d
distanceToPoint(
point: VecLike,
hitInside?: boolean,
filters?: Geometry2dFilters,
): number;Parameters
| Name | Description |
|---|---|
| |
| |
|
Returns
number;getArea( )
from Geometry2d
getArea(): number;getBounds( )
from Geometry2d
getBounds(): Box;getBoundsVertices( )
from Geometry2d
getBoundsVertices(): Vec[];getLength( )
getLength(): number;getSvgPathData( )
getSvgPathData(first?: boolean): string;Parameters
| Name | Description |
|---|---|
| |
Returns
string;getVertices( )
getVertices(): Vec[];hitTestLineSegment( )
Parameters
Returns
boolean;hitTestPoint( )
from Geometry2d
hitTestPoint(
point: VecLike,
margin?: number,
hitInside?: boolean,
_filters?: Geometry2dFilters,
): boolean;Parameters
| Name | Description |
|---|---|
| |
| |
| |
|
Returns
boolean;ignoreHit( )
from Geometry2d
Called after a hit test succeeds. Return true to reject the hit and allow shapes behind this one to be selected instead (e.g. transparent image pixels).
ignoreHit(_point: VecLike): boolean;Parameters
| Name | Description |
|---|---|
|
Returns
boolean;interpolateAlongEdge( )
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): Vec;Parameters
| Name | Description |
|---|---|
| |
|
Returns
Vec;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): boolean;Parameters
| Name | Description |
|---|---|
|
Returns
boolean;isPointInBounds( )
from Geometry2d
isPointInBounds(point: VecLike, margin?: number): boolean;Parameters
| Name | Description |
|---|---|
| |
| |
Returns
boolean;nearestPoint( )
Parameters
| Name | Description |
|---|---|
|
Returns
Vec;overlapsPolygon( )
from Geometry2d
overlapsPolygon(_polygon: VecLike[]): boolean;Parameters
| Name | Description |
|---|---|
| |
Returns
boolean;toSimpleSvgPath( )
from Geometry2d
toSimpleSvgPath(): string;transform( )
from Geometry2d
transform(
transform: MatModel,
opts?: TransformedGeometry2dOptions,
): Geometry2d;Parameters
| 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): number;Parameters
| Name | Description |
|---|---|
| |
|
Returns
number;Next
BaseBoxShapeTool