hps-0.14: Haskell Postscript

Safe HaskellSafe-Inferred

Graphics.PS.Paper

Description

Paper sizes. For ISO sizes see http://www.cl.cam.ac.uk/~mgk25/iso-paper.html.

Synopsis

Documentation

data Paper Source

Paper size data type.

Constructors

Paper 

Fields

width :: Int
 
height :: Int
 

Instances

data BBox Source

BoundingBox for an EPSF file with an optional HiResBoundingBox

Constructors

BBox 

Fields

llx :: Int

lower left x (x-min)

lly :: Int

lower left y (y-min)

urx :: Int

upper right x (x-max)

ury :: Int

upper right y (y-max)

HRBBox 

Fields

llx :: Int

lower left x (x-min)

lly :: Int

lower left y (y-min)

urx :: Int

upper right x (x-max)

ury :: Int

upper right y (y-max)

hrllx :: Double

high resolution llx

hrlly :: Double

high resolution lly

hrurx :: Double

high resolution urx

hrury :: Double

high resolution ury

Instances

landscape :: Paper -> PaperSource

Swap width and height of Paper.

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 :: PaperSource

ISO A sizes in millimeters.

 a4 == Paper 210 297

a10 :: PaperSource

ISO A sizes in millimeters.

 a4 == Paper 210 297

a9 :: PaperSource

ISO A sizes in millimeters.

 a4 == Paper 210 297

a8 :: PaperSource

ISO A sizes in millimeters.

 a4 == Paper 210 297

a7 :: PaperSource

ISO A sizes in millimeters.

 a4 == Paper 210 297

a6 :: PaperSource

ISO A sizes in millimeters.

 a4 == Paper 210 297

a5 :: PaperSource

ISO A sizes in millimeters.

 a4 == Paper 210 297

a4 :: PaperSource

ISO A sizes in millimeters.

 a4 == Paper 210 297

a3 :: PaperSource

ISO A sizes in millimeters.

 a4 == Paper 210 297

a2 :: PaperSource

ISO A sizes in millimeters.

 a4 == Paper 210 297

a1 :: PaperSource

ISO A sizes in millimeters.

 a4 == Paper 210 297

b0 :: PaperSource

ISO B sizes in millimeters.

 b4 == Paper 250 354

b10 :: PaperSource

ISO B sizes in millimeters.

 b4 == Paper 250 354

b9 :: PaperSource

ISO B sizes in millimeters.

 b4 == Paper 250 354

b8 :: PaperSource

ISO B sizes in millimeters.

 b4 == Paper 250 354

b7 :: PaperSource

ISO B sizes in millimeters.

 b4 == Paper 250 354

b6 :: PaperSource

ISO B sizes in millimeters.

 b4 == Paper 250 354

b5 :: PaperSource

ISO B sizes in millimeters.

 b4 == Paper 250 354

b4 :: PaperSource

ISO B sizes in millimeters.

 b4 == Paper 250 354

b3 :: PaperSource

ISO B sizes in millimeters.

 b4 == Paper 250 354

b2 :: PaperSource

ISO B sizes in millimeters.

 b4 == Paper 250 354

b1 :: PaperSource

ISO B sizes in millimeters.

 b4 == Paper 250 354

c0 :: PaperSource

ISO C sizes in millimeters.

 c4 == Paper 229 324

c10 :: PaperSource

ISO C sizes in millimeters.

 c4 == Paper 229 324

c9 :: PaperSource

ISO C sizes in millimeters.

 c4 == Paper 229 324

c8 :: PaperSource

ISO C sizes in millimeters.

 c4 == Paper 229 324

c7 :: PaperSource

ISO C sizes in millimeters.

 c4 == Paper 229 324

c6 :: PaperSource

ISO C sizes in millimeters.

 c4 == Paper 229 324

c5 :: PaperSource

ISO C sizes in millimeters.

 c4 == Paper 229 324

c4 :: PaperSource

ISO C sizes in millimeters.

 c4 == Paper 229 324

c3 :: PaperSource

ISO C sizes in millimeters.

 c4 == Paper 229 324

c2 :: PaperSource

ISO C sizes in millimeters.

 c4 == Paper 229 324

c1 :: PaperSource

ISO C sizes in millimeters.

 c4 == Paper 229 324

usLetter :: PaperSource

US Letter size in millimeters (ie Paper 216 279).

tabloid :: 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]