diagrams-qrcode 1.0.1 → 1.1
raw patch · 4 files changed
+11/−9 lines, 4 filesdep ~diagrams-coredep ~diagrams-lib
Dependency ranges changed: diagrams-core, diagrams-lib
Files
- diagrams-qrcode.cabal +6/−6
- examples/using-haskell-qrencode.hs +1/−1
- examples/using-qrcode.hs +1/−1
- src/Diagrams/QRCode.hs +3/−1
diagrams-qrcode.cabal view
@@ -1,12 +1,12 @@ name: diagrams-qrcode-version: 1.0.1+version: 1.1 synopsis: Draw QR codes to SVG, PNG, PDF or PS files. homepage: https://github.com/meteficha/diagrams-qrcode license: BSD3 license-file: LICENSE-author: Felipe Lessa <felipe.lessa@loyful.com>-maintainer: Felipe Lessa <felipe.lessa@loyful.com>-copyright: (c) 2012-2013 Loyful <opensource@loyful.com>+author: Felipe Lessa <felipe.lessa@prowdsponsor.com>+maintainer: Felipe Lessa <felipe.lessa@prowdsponsor.com>+copyright: (c) 2012-2014 Prowdsponsor <opensource@prowdsponsor.com> category: Graphics build-type: Simple cabal-version: >=1.8@@ -40,7 +40,7 @@ base >= 4.5 && < 4.7 , array , colour- , diagrams-core == 0.6.*- , diagrams-lib == 0.6.*+ , diagrams-core == 1.1.*+ , diagrams-lib == 1.1.* hs-source-dirs: src/ ghc-options: -Wall
examples/using-haskell-qrencode.hs view
@@ -17,4 +17,4 @@ let dia = D.scale 6 $ QR.stroke $ QR.pathMatrix $ QR.toMatrix qrcode -- Render diagram- L8.putStrLn $ renderSvg $ D.renderDia D.SVG (D.SVGOptions D.Absolute) dia+ L8.putStrLn $ renderSvg $ D.renderDia D.SVG (D.SVGOptions D.Absolute Nothing) dia
examples/using-qrcode.hs view
@@ -18,4 +18,4 @@ let dia = D.scale 6 $ QR.stroke $ QR.pathArray $ fmap not $ QR.toArray qrcode -- Render diagram- L8.putStrLn $ renderSvg $ D.renderDia D.SVG (D.SVGOptions D.Absolute) dia+ L8.putStrLn $ renderSvg $ D.renderDia D.SVG (D.SVGOptions D.Absolute Nothing) dia
src/Diagrams/QRCode.hs view
@@ -7,7 +7,9 @@ import Data.Monoid (mempty) import qualified Diagrams.Attributes as D import qualified Diagrams.Core as D+import qualified Diagrams.Located as D import qualified Diagrams.Path as D+import qualified Diagrams.Trail as D import qualified Diagrams.TwoD as D @@ -30,7 +32,7 @@ -- into a 'Path'. 'minBound' values are considered to be -- \"off\", while every other value is considered to be \"on\". pathList :: (Bounded a, Eq a, Integral ix) => [((ix, ix), a)] -> D.Path D.R2-pathList = D.Path . fmap (p2int *** toTrail)+pathList = D.Path . fmap (uncurry (flip D.at) . (p2int *** toTrail)) where p2int = D.p2 . (fromIntegral *** fromIntegral)