Portability | GHC |
---|---|

Stability | highly unstable |

Maintainer | stephen.tetley@gmail.com |

Safe Haskell | Safe-Infered |

Alternative to the `DrawingPrimitives`

module in Wumpus-Basic.

The drawing primitives here are either slightly higher level or less general (more quirky).

This module is expected to be imported qualified - other modules (e.g. shapes and paths) are likely to export conflicting names.

** WARNING ** - much of this module is probably obsolete (except wedge).

- horizontalLine :: InterpretUnit u => u -> LocGraphic u
- verticalLine :: InterpretUnit u => u -> LocGraphic u
- pivotLine :: (Floating u, InterpretUnit u) => u -> u -> Radian -> LocGraphic u
- blRectangle :: InterpretUnit u => DrawMode -> u -> u -> LocGraphic u
- ctrRectangle :: (Fractional u, InterpretUnit u) => DrawMode -> u -> u -> LocGraphic u
- wedge :: (Real u, Floating u, InterpretUnit u) => DrawMode -> u -> Radian -> LocThetaGraphic u

# Lines

horizontalLine :: InterpretUnit u => u -> LocGraphic uSource

Draw a horizontal line.

verticalLine :: InterpretUnit u => u -> LocGraphic uSource

Draw a vertical line.

pivotLine :: (Floating u, InterpretUnit u) => u -> u -> Radian -> LocGraphic uSource

`pivotLine`

: ` left_length * right_length * incline -> LocGraphic `

Draw a *pivot* line. The start point is a pivot along the line,
not the end. The left and right distances are the extension of
the line from the pivot.

# Rectangles

blRectangle :: InterpretUnit u => DrawMode -> u -> u -> LocGraphic uSource

Draw a rectangle, start point is bottom left.

ctrRectangle :: (Fractional u, InterpretUnit u) => DrawMode -> u -> u -> LocGraphic uSource

Draw a rectangle, start point is bottom left.

# Wedge

wedge :: (Real u, Floating u, InterpretUnit u) => DrawMode -> u -> Radian -> LocThetaGraphic uSource

wedge : mode * radius * apex_angle

Wedge is drawn at the apex.