Maintainer | diagrams-discuss@googlegroups.com |
---|
Various two-dimensional 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
- starPolygon :: (Backend b R2, Renderable (Path R2) b) => Int -> Int -> Diagram b R2
- eqTriangle :: (Backend b R2, Renderable (Path R2) b) => 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.
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 x-axis.