Options
All
  • Public
  • Public/Protected
  • All
Menu
classdesc

A simple circle sector: circle, start- and end-angle.

requires

Line

requires

SVGSerializale

requires

UID

requires

UIDGenerator

requires

XYCoords

Hierarchy

  • CircleSector

Implements

Index

Constructors

Properties

Methods

Object literals

Constructors

constructor

  • Create a new circle sector with given circle, start- and end-angle.

    name

    CircleSector

    Parameters

    • circle: Circle

      The circle.

    • startAngle: number

      The start angle of the sector.

    • endAngle: number

      The end angle of the sector.

    Returns CircleSector

Properties

circle

circle: Circle
member

{Circle}

memberof

CircleSector

instance

Readonly className

className: string = "CircleSector"

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

endAngle

endAngle: number
member

{number}

memberof

CircleSector

instance

startAngle

startAngle: number
member

{number}

memberof

CircleSector

instance

Readonly uid

uid: UID

The UID of this drawable object.

member

{UID}

memberof

CircleSector

instance
readonly

Methods

toSVGString

  • toSVGString(options: { className?: string }): string
  • Create an SVG representation of this circle.

    method

    toSVGString

    instance
    memberof

    Circle

    Parameters

    • options: { className?: string }

      An optional set of options, like 'className'.

      • Optional className?: string

    Returns string

    A string representing the SVG code for this vertex.

Object literals

Static circleSectorUtils

circleSectorUtils: object

describeSVGArc

  • describeSVGArc(x: number, y: number, radius: number, startAngle: number, endAngle: number, options?: { moveToStart: boolean }): SVGPathParams

polarToCartesian

  • polarToCartesian(centerX: number, centerY: number, radius: number, angle: number): XYCoords
  • Helper function to convert polar circle coordinates to cartesian coordinates.

    TODO: generalize for ellipses (two radii).

    Parameters

    • centerX: number
    • centerY: number
    • radius: number
    • angle: number

      The angle in radians.

    Returns XYCoords

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Private property
  • Private method
  • Static property
  • Static method

Generated using TypeDoc