Table of contents

Public class

Signature
class Circle2d extends Geometry2d {}
References

Geometry2d

Source

packages/editor/src/lib/primitives/geometry/Circle2d.ts


Constructor

Public constructor

Constructs a new instance of the Circle2d class

Parameters
NameDescription

config

Omit<Geometry2dOptions, 'isClosed'> & {
  isFilled: boolean
  radius: number
  x?: number
  y?: number
}

Properties


config

Public property

Signature
config: Omit<Geometry2dOptions, 'isClosed'> & {
  isFilled: boolean
  radius: number
  x?: number
  y?: number
}

radius

Public property

Signature
radius: number

x

Public property

Signature
x: number

y

Public property

Signature
y: number

Methods

getBounds()

Public method

Signature
getBounds(): Box
References

Box


getVertices()

Public method

Signature
getVertices(): Vec[]
References

Vec


hitTestLineSegment()

Public method

Signature
hitTestLineSegment(A: Vec, B: Vec, distance?: number): boolean
Parameters
NameDescription

A

Vec

B

Vec

distance

number
Returns
boolean
References

Vec


nearestPoint()

Public method

Signature
nearestPoint(point: Vec): Vec
Parameters
NameDescription

point

Vec
Returns
Vec
References

Vec


canonicalizeRotationclamp