wumpus-basic-0.11.0: Common drawing utilities built on wumpus-core.

PortabilityGHC
Stabilityhighly unstable
MaintainerStephen Tetley <stephen.tetley@gmail.com>

Wumpus.Basic.Shapes.Base

Contents

Description

Common core for shapes

** WARNING ** - the types of Shapes and Plaintext are not ideal and are pending revision.

Synopsis

Documentation

data Shape u t Source

Note - this formulation prevents rounded corner shapes...

Currently shapes that aren't paths:

 Coordinate
 FreeLabel

Alternative

 out_fun :: ShapeCTM u -> (Path u,sh)

All shapes expect FreeLabel are oblivious to the DrawingContext for the shape

Constructors

Shape 

Fields

src_ctm :: ShapeCTM u
 
path_fun :: ShapeCTM u -> Path u
 
cons_fun :: ShapeCTM u -> t u
 

Instances

(Real u, Floating u) => Rotate (Shape u sh) 
Num u => Scale (Shape u sh) 
Num u => Translate (Shape u sh) 

type ShapeConstructor u t = ShapeCTM u -> t uSource

borderedShape :: Num u => Shape u t -> Image u (t u)Source

filledShape :: Num u => Shape u t -> Image u (t u)Source

strokedShape :: Num u => Shape u t -> Image u (t u)Source

ShapeCTM

data ShapeCTM u Source

Constructors

ShapeCTM 

Fields

ctm_trans_x :: !u
 
ctm_trans_y :: !u
 
ctm_scale_x :: !u
 
ctm_scale_y :: !u
 
ctm_rotation :: Radian
 

Instances

Eq u => Eq (ShapeCTM u) 
Ord u => Ord (ShapeCTM u) 
Show u => Show (ShapeCTM u)