Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Paper sizes. For ISO sizes see http://www.cl.cam.ac.uk/~mgk25/iso-paper.html.
- data Paper = Paper {}
- data BBox
- landscape :: Paper -> Paper
- divRound :: Int -> Int -> Int
- iso_down_scale :: Paper -> Paper
- a0 :: Paper
- a10 :: Paper
- a9 :: Paper
- a8 :: Paper
- a7 :: Paper
- a6 :: Paper
- a5 :: Paper
- a4 :: Paper
- a3 :: Paper
- a2 :: Paper
- a1 :: Paper
- b0 :: Paper
- b10 :: Paper
- b9 :: Paper
- b8 :: Paper
- b7 :: Paper
- b6 :: Paper
- b5 :: Paper
- b4 :: Paper
- b3 :: Paper
- b2 :: Paper
- b1 :: Paper
- c0 :: Paper
- c10 :: Paper
- c9 :: Paper
- c8 :: Paper
- c7 :: Paper
- c6 :: Paper
- c5 :: Paper
- c4 :: Paper
- c3 :: Paper
- c2 :: Paper
- c1 :: Paper
- usLetter :: Paper
- broadsheet :: Paper
- tabloid :: Paper
- berliner :: Paper
- proportion :: Paper -> Double
Documentation
divRound :: Int -> Int -> Int Source
A div
variant that rounds rather than truncates.
let f (Paper _ h) = h `div` 2 == h `divRound` 2 in all id (map f [b0,b1,b2,b3,b4,b5,b6,b7,b8,b9]) == False
iso_down_scale :: Paper -> Paper Source
ISO size downscaling, ie. from A0
to A1
.
iso_down_scale a4 == a5
Newspaper sizes in millimeters. See http://www.papersizes.org/newspaper-sizes.htm.
Newspaper sizes in millimeters. See http://www.papersizes.org/newspaper-sizes.htm.
Newspaper sizes in millimeters. See http://www.papersizes.org/newspaper-sizes.htm.
proportion :: Paper -> Double Source
Proportion of Paper
.
proportion broadsheet == 1.25 map (round . (* 1e3) . proportion) [a0,b0,c0] == [1414,1414,1414] map proportion [usLetter,berliner,tabloid]