Group2d
Table of contents
- area
- bounds
- boundsVertices
- center
- children
- debugColor
- excludeFromShapeBounds
- ignore
- ignoredChildren
- 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 Group2d extends Geometry2d {}Constructor
Constructs a new instance of the Group2d 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;children
children: Geometry2d[];debugColor
optional
from Geometry2d
debugColor?: string;excludeFromShapeBounds
from Geometry2d
excludeFromShapeBounds: boolean;ignore
optional
from Geometry2d
ignore?: boolean;ignoredChildren
ignoredChildren: Geometry2d[];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( )
distanceToPoint(
point: VecLike,
hitInside?: boolean,
filters?: Geometry2dFilters,
): number;Parameters
| Name | Description |
|---|---|
| |
| |
|
Returns
number;getArea( )
getArea(): number;getBounds( )
from Geometry2d
getBounds(): Box;getBoundsVertices( )
getBoundsVertices(): Vec[];getLength( )
getLength(filters?: Geometry2dFilters): number;Parameters
| Name | Description |
|---|---|
|
Returns
number;getSvgPathData( )
getSvgPathData(): string;getVertices( )
getVertices(filters: Geometry2dFilters): Vec[];Parameters
| Name | Description |
|---|---|
|
Returns
Vec[];hitTestLineSegment( )
hitTestLineSegment(
A: VecLike,
B: VecLike,
zoom: number,
filters?: Geometry2dFilters,
): boolean;Parameters
| Name | Description |
|---|---|
| |
| |
| |
|
Returns
boolean;hitTestPoint( )
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( )
interpolateAlongEdge(t: number, filters?: Geometry2dFilters): Vec;Parameters
| Name | Description |
|---|---|
| |
|
Returns
Vec;intersectCircle( )
intersectCircle(
center: VecLike,
radius: number,
filters?: Geometry2dFilters,
): VecLike[];Parameters
| Name | Description |
|---|---|
| |
| |
|
Returns
VecLike[];intersectLineSegment( )
intersectLineSegment(
A: VecLike,
B: VecLike,
filters?: Geometry2dFilters,
): VecLike[];Parameters
| Name | Description |
|---|---|
| |
| |
|
Returns
VecLike[];intersectPolygon( )
intersectPolygon(polygon: VecLike[], filters?: Geometry2dFilters): VecLike[];Parameters
| Name | Description |
|---|---|
| |
|
Returns
VecLike[];intersectPolyline( )
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( )
nearestPoint(point: VecLike, filters?: Geometry2dFilters): Vec;Parameters
| Name | Description |
|---|---|
| |
|
Returns
Vec;overlapsPolygon( )
overlapsPolygon(polygon: VecLike[]): boolean;Parameters
| Name | Description |
|---|---|
| |
Returns
boolean;toSimpleSvgPath( )
toSimpleSvgPath(): string;transform( )
transform(transform: Mat): Geometry2d;Parameters
| Name | Description |
|---|---|
| |
Returns
uninterpolateAlongEdge( )
uninterpolateAlongEdge(point: VecLike, filters?: Geometry2dFilters): number;Parameters
| Name | Description |
|---|---|
| |
|
Returns
number;Prev
Geometry2dNext
GroupShapeUtil