Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ArcSegment

Describes an elliptical arc between two points. To define an arc segment you have to specify two points and an ellipse. Usually, there are two possible ellipses of the same size through two points, and on these two ellipses, there are four different ellipse segments which go from the first to the second point. To define how the arc segment looks like, you have to specify additional parameters as shown in the following picture:

color arcType sweepDirection
blue small counterclockwise
orange small clockwise
green large counterclockwise
red large clockwise

Hierarchy

Implements

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

angle

angle: number

Gets or sets the rotation angle of the ellipse in degrees.

arcType

arcType: ArcType

Gets or sets the arc type. Since there are always two different arcs with the same radius and the same sweep direction between two points, this parameter can be used to determine which one is used. Valid values are small and large.

size

size: Size

Gets or sets the x and y radius of the underlying ellipse on which the arc segment is based on. In case the ellipse is too small to span an arc between the start point and the end point, it will be scaled until it fits, preserving the aspect ratio of the ellipse.

sweepDirection

sweepDirection: SweepDirection

Gets or sets the sweep direction. Since there are always two different arcs with the same radius and the same arc size between two points, this parameter can be used to determine which one is used. Valid values are clockwise and counterclockwise.

to

to: Point

Gets or sets the endpoint of the arc.

Accessors

Private type

  • get type(): "arc"
  • Returns "arc"

Methods

Private serialize

  • serialize(target: BufferWriter): void
  • Parameters

    • target: BufferWriter

    Returns void

Static create

  • Returns the path segment that is defined by the specified description.

    Parameters

    Returns PathSegment

Static createArcSegment

  • Returns the arc segment that is defined by the specified description.

    Parameters

    Returns ArcSegment

Generated using TypeDoc