Skip to main content

CircleSegment

class CircleSegment extends Segment

Constructors​

constructor​

public override new CircleSegmentcenter: Vector2radius: numberfrom: Vector2to: Vector2counter: boolean: CircleSegment

Parameters

Overwrites Segment.constructor

Properties​

points​

readonly public points: Vector2[]

Accessors​

arcLength​

public get override arcLength(): number
Overwrites Segment.arcLength

Methods​

draw​

public override drawcontext: CanvasRenderingContext2DPath2Dfrom: numberto: number: CurvePointCurvePoint

Parameters

Overwrites Segment.draw

getPoint​

public override getPointdistance: number: CurvePoint

Parameters

Overwrites Segment.getPoint

toSVGCommands​

public override toSVGCommandsfrom: number = 0to: number = 1move: boolean = false: string

Convert this segment to SVG path commands.

Parameters

  • from: number = 0
  • to: number = 1
  • move: boolean = false

    Whether to include a moveTo command at the start

Overwrites Segment.toSVGCommands