Graphics.PS.Paper
Description
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, a10, a9, a8, a7, a6, a5, a4, a3, a2, a1 :: Paper
- b0, b10, b9, b8, b7, b6, b5, b4, b3, b2, b1 :: Paper
- c0, c10, c9, c8, c7, c6, c5, c4, c3, c2, c1 :: Paper
- usLetter :: Paper
- broadsheet, tabloid, berliner :: Paper
- proportion :: Paper -> Double
Documentation
Paper size data type.
divRound :: Int -> Int -> IntSource
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 -> PaperSource
ISO size downscaling, ie. from A0
to A1
.
iso_down_scale a4 == a5
a0, a10, a9, a8, a7, a6, a5, a4, a3, a2, a1 :: PaperSource
ISO A sizes in millimeters.
a4 == Paper 210 297
b0, b10, b9, b8, b7, b6, b5, b4, b3, b2, b1 :: PaperSource
ISO B sizes in millimeters.
b4 == Paper 250 354
c0, c10, c9, c8, c7, c6, c5, c4, c3, c2, c1 :: PaperSource
ISO C sizes in millimeters.
c4 == Paper 229 324
broadsheet, tabloid, berliner :: PaperSource
Newspaper sizes in millimeters. See http://www.papersizes.org/newspaper-sizes.htm.
proportion :: Paper -> DoubleSource
Proportion of Paper
.
proportion broadsheet == 1.25 map (round . (* 1e3) . proportion) [a0,b0,c0] == [1414,1414,1414] map proportion [usLetter,berliner,tabloid]