diagrams-0.1: An EDSL for creating simple diagrams

Portabilityportable
Stabilityexperimental
Maintainerbyorgey@gmail.com
Safe HaskellNone

Graphics.Rendering.Diagrams.Shapes

Description

Primitive shapes out of which Diagrams can be built, implemented via instances of ShapeClass.

Synopsis

Documentation

circle :: Double -> DiagramSource

circle r is a circle with radius r.

poly :: Int -> Double -> DiagramSource

poly n r is a regular n-gon, with a circumcircle of radius r. One vertex is oriented along the positive x-axis. Note that the bounding box is the square circumscribed around the circumcircle.

rect :: Double -> Double -> DiagramSource

rect w h is a rectangle of width w and height h.

draw :: DiaRenderM ()Source

Draw the shape defined by the current cairo path, using the current fill color, stroke color, and stroke width settings.