Table of contents

Extends Geometry2d.

class Arc2d extends Geometry2d {}

Constructor

Constructs a new instance of the Arc2d class

Parameters

NameDescription

config

Omit<
  Geometry2dOptions,
  'isClosed' | 'isFilled'
> & {
  center: Vec
  end: Vec
  largeArcFlag: number
  start: Vec
  sweepFlag: number
}

Properties


angleEnd

angleEnd: number

angleStart

angleStart: number

area

readonly
get area(): number

bounds

readonly
get bounds(): Box

center

readonly
get center(): Vec

debugColor

optional
debugColor?: string

end

end: Vec

ignore

optional
ignore?: boolean

isClosed

isClosed: boolean

isFilled

isFilled: boolean

isLabel

isLabel: boolean

largeArcFlag

largeArcFlag: number

length

readonly
get length(): number

measure

measure: number

radius

radius: number

start

start: Vec

sweepFlag

sweepFlag: number

vertices

readonly
get vertices(): Vec[]

Methods

distanceToLineSegment()

distanceToLineSegment(A: Vec, B: Vec): number

Parameters

NameDescription

A

B

Returns

number

distanceToPoint()

distanceToPoint(point: Vec, hitInside?: boolean): number

Parameters

NameDescription

point

hitInside

boolean

Returns

number

getArea()

getArea(): number

getBounds()

getBounds(): Box

getLength()

getLength(): number

getSvgPathData()

getSvgPathData(first?: boolean): string

Parameters

NameDescription

first

boolean

Returns

string

getVertices()

getVertices(): Vec[]

hitTestLineSegment()

hitTestLineSegment(A: Vec, B: Vec): boolean

Parameters

NameDescription

A

B

Returns

boolean

hitTestPoint()

hitTestPoint(point: Vec, margin?: number, hitInside?: boolean): boolean

Parameters

NameDescription

point

margin

number

hitInside

boolean

Returns

boolean

isPointInBounds()

isPointInBounds(point: Vec, margin?: number): boolean

Parameters

NameDescription

point

margin

number

Returns

boolean

nearestPoint()

nearestPoint(point: Vec): Vec

Parameters

NameDescription

point

Returns


nearestPointOnLineSegment()

nearestPointOnLineSegment(A: Vec, B: Vec): Vec

Parameters

NameDescription

A

B

Returns


toSimpleSvgPath()

toSimpleSvgPath(): string

Next
BaseBoxShapeTool