Classdesc

A simple circle: center point and radius.

Requires

Line

Requires

Vector

Requires

VertTuple

Requires

Vertex

Requires

SVGSerializale

Requires

UID

Requires

UIDGenerator

Implements

Constructors

Properties

center: Vertex

Member

Memberof

Circle

Instance

className: string = "Circle"

Required to generate proper CSS classes and other class related IDs.

isDestroyed: boolean

Member

isDestroyed

Memberof

CubicBezierCurve

Instance

radius: number

Member

Memberof

Circle

Instance

uid: string

The UID of this drawable object.

Member

Memberof

Circle

Instance

circleUtils: {
    vertAt: ((angle, radius) => Vertex);
} = ...

Type declaration

  • vertAt: ((angle, radius) => Vertex)
      • (angle, radius): Vertex
      • Parameters

        • angle: number
        • radius: number

        Returns Vertex

Methods

  • Calculate the intersection points (if exists) with the given circle.

    Parameters

    Returns Line

    The intersection points (as a line) or null if the two circles do not intersect.

    Method

    circleIntersection

    Instance

    Memberof

    Circle

  • Calculate the closest point on the outline of this circle to the given point.

    Parameters

    • vert: XYCoords

      The point to find the closest circle point for.

    Returns Vertex

    The closest point on this circle.

    Method

    closestPoint

    Instance

    Memberof

    Circle

  • Check if the given circle is fully contained inside this circle.

    Parameters

    • circle: Circle

      The circle to check if it is contained in this circle.

    Returns boolean

    true if any only if the given circle is completely inside this circle.

    Method

    containsCircle

    Instance

    Memberof

    Circle

  • Check if the given circle is fully contained inside this circle.

    Parameters

    • point: XYCoords

      The point to check if it is contained in this circle.

    Returns boolean

    true if the given point is inside this circle.

    Method

    containsPoint

    Instance

    Memberof

    Circle

  • This function should invalidate any installed listeners and invalidate this object. After calling this function the object might not hold valid data any more and should not be used.

    Returns void

  • Calculate the distance from this circle to the given line.

    • If the line does not intersect this ciecle then the returned value will be the minimal distance.
    • If the line goes through this circle then the returned value will be max inner distance and it will be negative.

    Parameters

    • line: VertTuple<any>

      The line to measure the distance to.

    Returns number

    The minimal distance from the outline of this circle to the given line.

    Method

    lineDistance

    Instance

    Memberof

    Circle

  • Calculate the intersection points (if exists) with the given infinite line (defined by two points).

    Parameters

    Returns Line

    The intersection points (as a line) or null if this circle does not intersect the line given.

    Method

    lineIntersection

    Instance

    Memberof

    Circle

  • Get a tangent line of this circle for a given angle.

    Point a of the returned line is located on the circle, the length equals the radius.

    Parameters

    • angle: number

      The angle (in radians) to use.

    Returns Vector

    The tangent line.

    Method

    tangentAt

    Instance

    Memberof

    Circle

  • Get the vertex on the this circle for the given angle.

    Parameters

    • angle: number

      The angle (in radians) to use.

    Returns Vertex

    The vertex (point) at the given angle.

    Method

    vertAt

    Instance

    Memberof

    Circle