Portability | GHC |
---|---|
Stability | highly unstable |
Maintainer | Stephen Tetley <stephen.tetley@gmail.com> |
Data types modelling the Graphics state
- data StrokeAttr
- data LineCap
- data LineJoin
- data DashPattern
- data FontAttr = FontAttr {}
- data SVGFontStyle
- type PSRgb = RGB3 Double
- data CTM u = CTM !u !u !u !u !u !u
- class ToCTM a where
- class PSColour a where
Data types
Stroke attributes
data StrokeAttr Source
Eq StrokeAttr | |
Show StrokeAttr | |
Ellipse StrokeAttr | |
Stroke StrokeAttr | |
Ellipse [StrokeAttr] | |
Stroke [StrokeAttr] | |
Ellipse (Gray Double, [StrokeAttr]) | |
Ellipse (Gray Double, StrokeAttr) | |
Ellipse (HSB3 Double, [StrokeAttr]) | |
Ellipse (HSB3 Double, StrokeAttr) | |
Ellipse (RGB3 Double, [StrokeAttr]) | |
Ellipse (RGB3 Double, StrokeAttr) | |
Stroke (Gray Double, [StrokeAttr]) | |
Stroke (Gray Double, StrokeAttr) | |
Stroke (HSB3 Double, [StrokeAttr]) | |
Stroke (HSB3 Double, StrokeAttr) | |
Stroke (RGB3 Double, [StrokeAttr]) | |
Stroke (RGB3 Double, StrokeAttr) |
Font
data SVGFontStyle Source
Colour
Current Translation Matrix
PostScript's current transformation matrix.
PostScript and its documentation considers the matrix to be in this form:
| a b 0 | | c d 0 | | tx ty 1 |
i.e it considers the homogeneous coordinates of an affine frame as rows rather than columns (Wumpus uses rows, as they were the usual representation in the geometry presentations that inspired it).
Using the component names that we have used in the
description of Frame2
, the CTM is:
| e0x e0y 0 | | e1x e1y 0 | | ox oy 1 |
The CTM is represented in PostScript as an array, using our names its layout is
[ e0x e0y e1x e1y ox oy ]
Some examples, the scaling matrix:
| sx 0 0 | | 0 sy 0 | = [ sx 0 0 sy 0 0 ] | 0 0 1 |
Translation (displacement) :
| 1 0 0 | | 0 1 0 | = [ 1 0 0 1 tx ty ] | tx ty 1 |
Rotation:
| cos(a) sin(a) 0 | | -sin(a) cos(a) 0 | = [ cos(a) sin(a) -sin(a) cos(a) 0 0 ] | 0 0 1 |
CTM !u !u !u !u !u !u |