diagrams-lib-0.4: Embedded domain-specific language for declarative graphics




Two-dimensional arcs, approximated by cubic bezier curves.



arc :: (Angle a, PathLike p, V p ~ R2) => a -> a -> pSource

Given a start angle s and an end angle e, arc s e is the path of a radius one arc counterclockwise between the two angles.

bezierFromSweep :: Rad -> [Segment R2]Source

bezierFromSweep s constructs a series of Cubic segments that start in the positive y direction and sweep counter clockwise through s radians. If s is negative, it will start in the negative y direction and sweep clockwise. When s is less than 0.0001 the empty list results. If the sweep is greater than tau then it is truncated to tau.

circlePath :: (PathLike p, Closeable p, V p ~ R2, Transformable p) => Double -> pSource

Create a closed circular path of the given radius, centered at the origin, beginning at (r,0).

wedge :: (Angle a, PathLike p, V p ~ R2) => Double -> a -> a -> pSource

Create a circular wedge of the given radius, beginning at the first angle and extending counterclockwise to the second.