# class Arc


Arc element defined by a start point, end point, center point, and orientation. Note that an arc cannot be fully defined without the orientation specified. Arcs with equal start and end points are considered a full circle, except for the case where radius equals 0 in which case the arc is undefined.


Arc inherits from ImmutableArc


# MEMBERS

# member read-only reversed

Type: Arc

Description: Returns a new arc in the reversed direction

# member read-only cc

Type: Arc

Description: Returns a new arc with direction counter clockwise

# member center

Type: Point

# member p1

Type: Point

# member p2

Type: Point

# CONSTRUCTORS

# constructor Arc()

Description: Create an arc of length 0 at 0,0.

# constructor Arc(center, start, end, direction)

Description: Create an arc from three points, start, end, and center. Direction is always required otherwise it is unknown which of the two possible arcs to create for the given points.

Parameters:

  • center: (Point) - Arc center
  • start: (Point) - Starting point
  • end: (Point) - Ending point
  • direction: (Direction) - Direction of the arc.

# constructor Arc(center, radius, startAngle, endAngle, direction)

Description:

Parameters:

  • center: (Point) -
  • radius: (Number) -
  • startAngle: (Number) -
  • endAngle: (Number) -
  • direction: (Direction) -

# FUNCTIONS

# function getTranslated(point)

Description:

Parameters:

  • point: (Point) - The point to translate by

Return:

(Arc) - Returns a new arc with translated by 'point'

# function getTranslated(x, y)

Description:

Parameters:

  • x: (Number) -
  • y: (Number) -

Return:

(Arc) -

# function setCenter(x, y)

Description:

Parameters:

  • x: (Number) -
  • y: (Number) -

# function setP1(x, y)

Description:

Parameters:

  • x: (Number) -
  • y: (Number) -

# function setP2(x, y)

Description:

Parameters:

  • x: (Number) -
  • y: (Number) -

# function setDirection(direction)

Description:

Parameters:

Last Updated: 12/20/2022, 8:12:45 AM