Maintainer  diagramsdiscuss@googlegroups.com 

Various twodimensional shapes.
 hrule :: (Backend b R2, Renderable (Path R2) b) => Double > Diagram b R2
 vrule :: (Backend b R2, Renderable (Path R2) b) => Double > Diagram b R2
 polygon :: (Backend b R2, Renderable (Path R2) b) => PolygonOpts > Diagram b R2
 polygonPath :: (PathLike p, V p ~ R2) => PolygonOpts > p
 polygonVertices :: PolygonOpts > [P2]
 data PolygonOpts = PolygonOpts {
 sides :: Int
 edgeSkip :: Int
 orientation :: PolygonOrientation
 data PolygonOrientation
 square :: (Backend b R2, Renderable (Path R2) b) => Diagram b R2
 rect :: (Backend b R2, Renderable (Path R2) b) => Double > Double > Diagram b R2
 starPolygon :: (Backend b R2, Renderable (Path R2) b) => Int > Int > Diagram b R2
 eqTriangle :: (Backend b R2, Renderable (Path R2) b) => Diagram b R2
 roundedRectPath :: (PathLike p, V p ~ R2) => R2 > Double > p
 roundedRect :: (Backend b R2, Renderable (Path R2) b) => R2 > Double > Diagram b R2
Miscellaneous
hrule :: (Backend b R2, Renderable (Path R2) b) => Double > Diagram b R2Source
Create a centered horizontal line of the given length.
vrule :: (Backend b R2, Renderable (Path R2) b) => Double > Diagram b R2Source
Create a centered vertical line of the given length.
General polygons
polygon :: (Backend b R2, Renderable (Path R2) b) => PolygonOpts > Diagram b R2Source
Create a regular polygon from the given options.
polygonPath :: (PathLike p, V p ~ R2) => PolygonOpts > pSource
Create a closed regular polygonal path from the given options.
polygonVertices :: PolygonOpts > [P2]Source
Generate the vertices of a regular polygon from the given options.
data PolygonOpts Source
PolygonOpts  

data PolygonOrientation Source
Determine how a polygon should be oriented.
Special polygons
square :: (Backend b R2, Renderable (Path R2) b) => Diagram b R2Source
A sqaure with its center at the origin and sides of length 1, oriented parallel to the axes.
rect :: (Backend b R2, Renderable (Path R2) b) => Double > Double > Diagram b R2Source
rect w h
is an axisaligned rectangle of width w
and height
h
, centered at the origin.
starPolygon :: (Backend b R2, Renderable (Path R2) b) => Int > Int > Diagram b R2Source
starPolygon p q
creates a star polygon, where p
indicates the
number of vertices, and an edge connects every q
th vertex.
eqTriangle :: (Backend b R2, Renderable (Path R2) b) => Diagram b R2Source
An equilateral triangle, with radius 1 and base parallel to the xaxis.
Other shapes
roundedRectPath :: (PathLike p, V p ~ R2) => R2 > Double > pSource
roundedRectPath v r
generates a closed trail, or closed path
centered at the origin, of an axisaligned rectangle with diagonal
v
and circular rounded corners of radius r
. r
must be
between 0
and half the smaller dimension of v
, inclusive; smaller or
larger values of r
will be treated as 0
or half the smaller
dimension of v
, respectively. The trail or path begins with the
right edge and proceeds counterclockwise.