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

Maintainerdiagrams-discuss@googlegroups.com
Safe HaskellNone

Diagrams.TwoD.Ellipse

Contents

Description

Two-dimensional ellipses (and, as a special case, circles).

Synopsis

Ellipse and circle diagrams

unitCircle :: (PathLike p, V p ~ R2) => pSource

A circle of radius 1, with center at the origin.

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

A circle of the given radius, centered at the origin. As a path, it begins at (r,0).

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

ellipse e constructs an ellipse with eccentricity e by scaling the unit circle in the X direction. The eccentricity must be within the interval [0,1).

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

ellipseXY x y creates an axis-aligned ellipse, centered at the origin, with radius x along the x-axis and radius y along the y-axis.