mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-13 09:02:54 +00:00
Reuse Reanimate.Builtin.Documentation.showColorMap
Former-commit-id: 66595c6d71ecda92c3fc8f55548ec9278a4863d5
This commit is contained in:
parent
a44e985706
commit
a16ba9e02f
12 changed files with 12 additions and 108 deletions
|
|
@ -7,12 +7,4 @@ import Reanimate
|
|||
import Reanimate.Builtin.Documentation
|
||||
|
||||
main :: IO ()
|
||||
main = reanimate $ docEnv $ animate $ const $ mkColorMap jet
|
||||
|
||||
mkColorMap :: (Double -> PixelRGB8) -> SVG
|
||||
mkColorMap f = center $ scaleToSize screenWidth screenHeight $ embedImage img
|
||||
where
|
||||
width = 256
|
||||
height = 1
|
||||
img = generateImage pixelRenderer width height
|
||||
pixelRenderer x _y = f (fromIntegral x / fromIntegral (width-1))
|
||||
main = reanimate $ docEnv $ animate $ const $ showColorMap jet
|
||||
|
|
|
|||
Loading…
Reference in a new issue