shine 0.2.0.2 → 0.2.0.3
raw patch · 4 files changed
+14/−5 lines, 4 filesdep ~base
Dependency ranges changed: base
Files
- LICENSE +1/−1
- README.md +4/−1
- shine.cabal +3/−3
- src/Graphics/Shine/Picture.hs +6/−0
LICENSE view
@@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Francesco Gazzetta+Copyright (c) 2016-2018 Francesco Gazzetta Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
README.md view
@@ -6,11 +6,14 @@ Heavily inspired by [gloss](http://gloss.ouroborus.net/). -**demo** (compiled tests) [here](http://fgaz.me/shine/tests)+**demo** (compiled tests) [here](http://fgaz.github.io/shine/tests) ## Compiling You need [ghcjs](https://github.com/ghcjs/ghcjs)++A great way of building ghcjs packages is to use the+[reflex platform](https://github.com/reflex-frp/reflex-platform) ## Usage
shine.cabal view
@@ -1,10 +1,10 @@ name: shine-version: 0.2.0.2+version: 0.2.0.3 cabal-version: >=1.8 build-type: Simple license: MIT license-file: LICENSE-copyright: (c) 2016-2017 Francesco Gazzetta+copyright: (c) 2016-2018 Francesco Gazzetta author: Francesco Gazzetta maintainer: Francesco Gazzetta <francygazz@gmail.com> stability: experimental@@ -30,7 +30,7 @@ Graphics.Shine.Image, Graphics.Shine.Picture, Graphics.Shine.Render- build-depends: base >=4.2 && <5,+ build-depends: base >=4.11 && <4.13, ghcjs-dom >=0.9 && <0.10, ghcjs-prim, keycode >=0.2 && <0.3,
src/Graphics/Shine/Picture.hs view
@@ -74,9 +74,15 @@ path :: [(Double, Double)] -> Picture path xs = foldMap (\((x,y),(x',y')) -> Line x y x' y') $ zip xs $ tail xs +-- | 'Picture's are 'Semigroup's. The composing function is the overlapping+-- (the right picture is drawn over the left one).+instance Semigroup Picture where+ (<>) = Over+ -- | 'Picture's are 'Monoid's. The identity is an 'Empty' (completely transparent) -- picture and the composing function is the overlapping (the right picture is -- drawn over the left one). instance Monoid Picture where mempty = Empty mappend = Over+