| |||||||||||||||||||||||
| |||||||||||||||||||||||
| |||||||||||||||||||||||
Description | |||||||||||||||||||||||
PDF API for Haskell | |||||||||||||||||||||||
Synopsis | |||||||||||||||||||||||
| |||||||||||||||||||||||
HPDF | |||||||||||||||||||||||
The PDF type | |||||||||||||||||||||||
data PDF | |||||||||||||||||||||||
| |||||||||||||||||||||||
PDF Operator used to build a PDF document (in addition to the Monoid ones) | |||||||||||||||||||||||
withContext :: PDF -> PdfCmd | |||||||||||||||||||||||
Create a new PDF graphic where the graphic context is saved/restored and thus isolated from additional modifications that could be applied to this PDF document | |||||||||||||||||||||||
(<>) :: PdfCmd -> PDF -> PDF | |||||||||||||||||||||||
Combine two PDF actions | |||||||||||||||||||||||
emptyPdf :: Float -> Float -> PDF | |||||||||||||||||||||||
Create a new empty document of given width and height | |||||||||||||||||||||||
type PdfCmd = (Cmd, [CreatedObject]) | |||||||||||||||||||||||
Type returned by a PDF command creator | |||||||||||||||||||||||
PDF Transformations | |||||||||||||||||||||||
module Graphics.PDF.Geometry | |||||||||||||||||||||||
PDF Text | |||||||||||||||||||||||
module Graphics.PDF.Text | |||||||||||||||||||||||
PDF Shapes | |||||||||||||||||||||||
module Graphics.PDF.Shape | |||||||||||||||||||||||
PDF Colors | |||||||||||||||||||||||
module Graphics.PDF.Color | |||||||||||||||||||||||
PDF Shadings | |||||||||||||||||||||||
module Graphics.PDF.Shading | |||||||||||||||||||||||
PDF Font | |||||||||||||||||||||||
module Graphics.PDF.Font | |||||||||||||||||||||||
PDF File | |||||||||||||||||||||||
module Graphics.PDF.File | |||||||||||||||||||||||
Example | |||||||||||||||||||||||
test :: IO () test = let document = rgbSpace <> chooseFont Helvetica 70 <> applyMatrix (translate 50 0) <> applyMatrix (rotate (Degree 45)) <> clipText 0 0 "HPDF" <> applyMatrix (rotate (Degree (-45))) <> applyMatrix (translate (-50) 0) <> fillColor (Rgb 0 0 1) <> fillRectangle 0 0 100 100 <> fillColor (Rgb 1 0 0) <> setAlpha 0.4 <> fillRectangle 50 50 100 100 <> resetAlpha <> fillColor (Rgb 0 1 0) <> fillRectangle 80 80 100 100 <> emptyPdf 180 180 in writePdf "test.pdf" document | |||||||||||||||||||||||
Produced by Haddock version 0.8 |