wumpus-basic-0.10.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

Synopsis

Documentation

data Shape u sh 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
 
out_fun :: ShapeCTM u -> Image u sh
 

Instances

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

drawShape :: Shape u sh -> Image u shSource

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) 
Show u => Show (ShapeCTM u) 

shapelabel :: (Real u, Floating u, FromPtSize u) => String -> ShapeLabel uSource

No scaling - change font size if needed.