Skip to content

Commit

Permalink
Merge pull request #14 from ggreif/master
Browse files Browse the repository at this point in the history
More precise PDFRect
  • Loading branch information
alpheccar authored Sep 17, 2016
2 parents 06a7d39 + 4ada68c commit 5a90137
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Graphics/PDF/LowLevel/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ pdfDictUnion (PDFDictionary a) (PDFDictionary b) = PDFDictionary $ M.union a b


-- | A PDF rectangle
data PDFRect = PDFRect !Int !Int !Int !Int
data PDFRect = PDFRect !Double !Double !Double !Double

instance PdfObject PDFRect where
toPDF (PDFRect a b c d) = toPDF . map (AnyPdfObject . PDFInteger) $ [a,b,c,d]
toPDF (PDFRect a b c d) = toPDF . map AnyPdfObject $ [a,b,c,d]

instance PdfLengthInfo PDFRect where

Expand Down
2 changes: 1 addition & 1 deletion Test/Penrose.hs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ a' s = withNewContext $ do

penrose :: PDF ()
penrose = do
page <- addPage (Just (PDFRect 0 0 (round (1.5*width)) (round width)))
page <- addPage (Just (PDFRect 0 0 (1.5*width) width))
newSection "Penrose" Nothing Nothing $ do
drawWithPage page $ do
applyMatrix (translate (20 :+ 5))
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md

# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
resolver: lts-4.0
resolver: lts-6.14

# Local packages, usually specified by relative directory name
packages:
Expand Down

0 comments on commit 5a90137

Please sign in to comment.