vivid v0.1.1 Vivid.Arc

This module represents an Arc, otherwise known as a circle segment.

Summary

Functions

center(arc)
init(center, radius, start_angle, range, steps \\ 12)

Creates an Arc.

center is a Point definining the center point of the arc’s parent circle. radius is the radius of the parent circle. start_angle is the angle at which to start drawing the arc, 0 is vertical. range is the number of degrees to draw the arc. steps the arc is drawn by dividing it into a number of lines. Defaults to 12.

iex> Vivid.Arc.init(Vivid.Point.init(5,5), 4, 45, 15)
%Vivid.Arc{
  center:      %Vivid.Point{x: 5, y: 5},
  radius:      4,
  start_angle: 45,
  range:       15,
  steps:       12
}
radius(arc)
range(arc)
start_angle(arc)
steps(arc)
to_path(arc)