PathBuilderGeometry2d
See source codeTable of contents
- area
- bounds
- center
- debugColor
- ignore
- isClosed
- isFilled
- isInternal
- isLabel
- length
- vertices
- Properties
- Methods
- distanceToLineSegment
- distanceToPoint
- getArea
- getBounds
- getLength
- getSegments
- getSvgPathData
- getVertices
- hitTestLineSegment
- hitTestPoint
- interpolateAlongEdge
- intersectCircle
- intersectLineSegment
- intersectPolygon
- intersectPolyline
- isExcludedByFilter
- isPointInBounds
- nearestPoint
- nearestPointOnLineSegment
- toSimpleSvgPath
- transform
- uninterpolateAlongEdge
Extends Geometry2d.
class PathBuilderGeometry2d extends Geometry2d {}Constructor
Constructs a new instance of the PathBuilderGeometry2d 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?: stringignore
optional
from Geometry2d
ignore?: booleanisClosed
from Geometry2d
isClosed: 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()
from Geometry2d
getBounds(): BoxgetLength()
from Geometry2d
getLength(_filters?: Geometry2dFilters): numberParameters
| Name | Description |
|---|---|
|
Returns
numbergetSegments()
getSegments(): Geometry2d[]getSvgPathData()
getSvgPathData(): stringgetVertices()
getVertices(filters: Geometry2dFilters): Vec[]Parameters
| Name | Description |
|---|---|
|
Returns
Vec[]hitTestLineSegment()
hitTestLineSegment(
A: VecLike,
B: VecLike,
distance?: number,
filters?: Geometry2dFilters
): booleanParameters
| Name | Description |
|---|---|
| |
| |
| |
|
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()
nearestPoint(point: VecLike, _filters?: Geometry2dFilters): VecParameters
| Name | Description |
|---|---|
| |
|
Returns
nearestPointOnLineSegment()
from Geometry2d
Deprecated: Iterate the vertices instead.
Parameters
Returns
toSimpleSvgPath()
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
PathBuilderNext
SelectTool