Portability | GHC |
---|---|
Stability | highly unstable |
Maintainer | Stephen Tetley <stephen.tetley@gmail.com> |
Common core for shapes
- data Shape u sh = Shape {}
- drawShape :: Shape u sh -> Image u sh
- data ShapeCTM u = ShapeCTM {
- ctm_trans_x :: !u
- ctm_trans_y :: !u
- ctm_scale_x :: !u
- ctm_scale_y :: !u
- ctm_rotation :: Radian
- identityCTM :: Num u => ShapeCTM u
- ctmDisplace :: (Real u, Floating u) => Point2 u -> ShapeCTM u -> Point2 u
- ctmCenter :: (Real u, Floating u) => ShapeCTM u -> Point2 u
- data ShapeLabel u
- runShapeLabel :: ShapeCTM u -> ShapeLabel u -> Graphic u
- nolabel :: ShapeLabel u
- shapelabel :: (Real u, Floating u, FromPtSize u) => String -> ShapeLabel u
Documentation
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
ShapeCTM
ShapeCTM | |
|
identityCTM :: Num u => ShapeCTM uSource
data ShapeLabel u Source
runShapeLabel :: ShapeCTM u -> ShapeLabel u -> Graphic uSource
nolabel :: ShapeLabel uSource
shapelabel :: (Real u, Floating u, FromPtSize u) => String -> ShapeLabel uSource
No scaling - change font size if needed.