Portability | GHC |
---|---|
Stability | highly unstable |
Maintainer | stephen.tetley@gmail.com |
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.
- (<>) :: Monoid a => a -> a -> a
- hline :: InterpretUnit u => u -> LocGraphic u
- vline :: InterpretUnit u => u -> LocGraphic u
- pivotLine :: (Floating u, InterpretUnit u) => u -> u -> Radian -> LocGraphic u
- oStraightLines :: InterpretUnit u => [Point2 u] -> Graphic u
- cStraightLines :: InterpretUnit u => DrawStyle -> [Point2 u] -> Graphic u
- blRectangle :: InterpretUnit u => DrawStyle -> u -> u -> LocGraphic u
- ctrRectangle :: (Fractional u, InterpretUnit u) => DrawStyle -> u -> u -> LocGraphic u
- arc :: (Floating u, InterpretUnit u) => u -> Radian -> LocThetaGraphic u
- wedge :: (Floating u, InterpretUnit u) => DrawStyle -> u -> Radian -> LocThetaGraphic u
Monoid mappend
Lines
hline :: InterpretUnit u => u -> LocGraphic uSource
Draw a horizontal line.
vline :: 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.
oStraightLines :: InterpretUnit u => [Point2 u] -> Graphic uSource
Draw an open path formed from straight line segments.
cStraightLines :: InterpretUnit u => DrawStyle -> [Point2 u] -> Graphic uSource
Draw an closed path formed from straight line segments.
Rectangles
blRectangle :: InterpretUnit u => DrawStyle -> u -> u -> LocGraphic uSource
Draw a rectangle, start point is bottom left.
ctrRectangle :: (Fractional u, InterpretUnit u) => DrawStyle -> u -> u -> LocGraphic uSource
Draw a rectangle, start point is bottom left.
Arc and wedge
arc :: (Floating u, InterpretUnit u) => u -> Radian -> LocThetaGraphic uSource
arc : radius * apex_angle
wedge :: (Floating u, InterpretUnit u) => DrawStyle -> u -> Radian -> LocThetaGraphic uSource
wedge : radius * apex_angle