Permalink
Browse files

sync with diagrams-rasterific-1.4.1

  • Loading branch information...
mlang committed Aug 24, 2018
1 parent 7365bcc commit f4a6bc42d0976a3600c91527809eb9b76b8829fb
Showing with 5 additions and 5 deletions.
  1. +1 −1 package.yaml
  2. +4 −4 src/Diagrams/Backend/Braille.hs
View
@@ -29,7 +29,7 @@ dependencies:
- mtl
- lens
- optparse-applicative
- Rasterific
- Rasterific >= 0.7.4 && < 0.8
- time
library:
@@ -158,10 +158,10 @@ runR :: Render Braille V2 n -> RenderM n ()
runR (R r) = r
instance Semigroup (Render Braille V2 n) where
R rd1 <> R rd2 = R (rd1 >> rd2)
R rd1 <> R rd2 = R $ rd1 >> rd2
instance Monoid (Render Braille V2 n) where
mempty = R $ return ()
mempty = R $ pure ()
instance Hashable n => Hashable (Options Braille V2 n) where
hashWithSalt s (BrailleOptions sz) = s `hashWithSalt` sz
@@ -290,8 +290,8 @@ renderPath p = (map . map) renderSeg (pathLocSegments p)
mkStroke :: TypeableFloat n => n -> R.Join -> (R.Cap, R.Cap) -> Maybe (R.DashPattern, n)
-> [[R.Primitive]] -> R.Drawing PixelRGBA8 ()
mkStroke (realToFrac -> l) j c d primList =
maybe (mapM_ (R.stroke l j c) primList)
(\(dsh, off) -> mapM_ (R.dashedStrokeWithOffset (realToFrac off) dsh l j c) primList)
maybe (R.stroke l j c $ concat primList)
(\(dsh, off) -> R.dashedStrokeWithOffset (realToFrac off) dsh l j c $ concat primList)
d
instance TypeableFloat n => Renderable (Path V2 n) Braille where

0 comments on commit f4a6bc4

Please sign in to comment.