wumpus-basic-0.2.0: Common drawing utilities built on wumpus-core.Source codeContentsIndex
Wumpus.Basic.Graphic
PortabilityGHC
Stabilityunstable
Maintainerstephen.tetley@gmail.com
Contents
Type aliases
New Bird..
Operations
Description

Graphic type and opertations

  • * WARNING ** this module is highly experimental, and may change significantly or even be dropped from future revisions.
Synopsis
type Graphic u = H (Primitive u)
type DGraphic = Graphic Double
type GraphicF u = Point2 u -> Graphic u
type DGraphicF = GraphicF Double
cc :: (r1 -> a -> ans) -> (r1 -> r2 -> a) -> r1 -> r2 -> ans
drawGraphic :: (Real u, Floating u) => Graphic u -> Maybe (Picture u)
wrapG :: Primitive u -> Graphic u
text :: (TextLabel t, Num u) => t -> String -> GraphicF u
straightLine :: (Stroke t, Num u) => t -> Vec2 u -> GraphicF u
strokedRectangle :: (Stroke t, Num u) => t -> u -> u -> GraphicF u
filledRectangle :: (Fill t, Num u) => t -> u -> u -> GraphicF u
circle :: (Ellipse t, Fractional u) => t -> u -> GraphicF u
Type aliases
type Graphic u = H (Primitive u)Source
Note - this representation allows for zero, one or more Primitives to be collected together.
type DGraphic = Graphic DoubleSource
type GraphicF u = Point2 u -> Graphic uSource
type DGraphicF = GraphicF DoubleSource
New Bird..
cc :: (r1 -> a -> ans) -> (r1 -> r2 -> a) -> r1 -> r2 -> ansSource
Operations
drawGraphic :: (Real u, Floating u) => Graphic u -> Maybe (Picture u)Source
Note - a Picture cannot be empty whereas a Graphic can. Hence this function returns via Maybe.
wrapG :: Primitive u -> Graphic uSource
Lift a Primitive to a Graphic
text :: (TextLabel t, Num u) => t -> String -> GraphicF uSource
straightLine :: (Stroke t, Num u) => t -> Vec2 u -> GraphicF uSource
strokedRectangle :: (Stroke t, Num u) => t -> u -> u -> GraphicF uSource
Point is bottom-left.
filledRectangle :: (Fill t, Num u) => t -> u -> u -> GraphicF uSource
Point is bottom-left.
circle :: (Ellipse t, Fractional u) => t -> u -> GraphicF uSource
Produced by Haddock version 2.6.1