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'> & {
  x?: number
  y?: number
  radius: number
  isFilled: boolean
}

Properties


config

Public property

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

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, _zoom: number): boolean
Parameters
NameDescription

A

Vec

B

Vec

_zoom

number
Returns
boolean
References

Vec


nearestPoint()

Public method

Signature
nearestPoint(point: Vec): Vec
Parameters
NameDescription

point

Vec
Returns
Vec
References

Vec


Canvasclamp