From 405fe8d280467496cc280001a58d4100c9f856f5 Mon Sep 17 00:00:00 2001 From: David Himmelstrup Date: Fri, 29 Nov 2019 09:35:30 +0800 Subject: [PATCH] Fix interpolation gifs. Former-commit-id: 1d596ff95e002b77fad2c5954e63846d252abf43 --- docs/gen_doc_gifs.sh | 3 ++- examples/doc_hsvComponents.hs | 14 ++++++++++++++ examples/doc_labComponents.hs | 14 ++++++++++++++ examples/doc_lchComponents.hs | 14 ++++++++++++++ examples/doc_xyzComponents.hs | 14 ++++++++++++++ 5 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 examples/doc_hsvComponents.hs create mode 100644 examples/doc_labComponents.hs create mode 100644 examples/doc_lchComponents.hs create mode 100644 examples/doc_xyzComponents.hs diff --git a/docs/gen_doc_gifs.sh b/docs/gen_doc_gifs.sh index 74b2b74..552e374 100755 --- a/docs/gen_doc_gifs.sh +++ b/docs/gen_doc_gifs.sh @@ -2,7 +2,8 @@ ROOT=`stack path --project-root` TINY='^(doc_turbo|doc_viridis|doc_magma|doc_inferno|doc_plasma|doc_sinebow|doc_cividis|doc_jet| - doc_hsv|doc_hsvMatlab|doc_greyscale|doc_parula|doc_rgbComponents|doc_hsvComponents)$' + newline|doc_hsvMatlab|doc_greyscale|doc_parula|doc_rgbComponents|doc_hsvComponents| + newline|doc_lchComponents|doc_xyzComponents|doc_labComponents)$' for src in $ROOT/examples/doc_*.hs; do BASE=`basename $src .hs` diff --git a/examples/doc_hsvComponents.hs b/examples/doc_hsvComponents.hs new file mode 100644 index 0000000..3616603 --- /dev/null +++ b/examples/doc_hsvComponents.hs @@ -0,0 +1,14 @@ +#!/usr/bin/env stack +-- stack runghc --package reanimate +module Main(main) where + +import Reanimate +import Reanimate.Interpolate +import Reanimate.Builtin.Documentation +import Codec.Picture + +main :: IO () +main = reanimate $ docEnv $ animate $ const $ showColorMap $ interpolateRGB8 hsvComponents yellow blue + where + yellow = PixelRGB8 0xFF 0xFF 0x00 + blue = PixelRGB8 0x00 0x00 0xFF diff --git a/examples/doc_labComponents.hs b/examples/doc_labComponents.hs new file mode 100644 index 0000000..71af8e9 --- /dev/null +++ b/examples/doc_labComponents.hs @@ -0,0 +1,14 @@ +#!/usr/bin/env stack +-- stack runghc --package reanimate +module Main(main) where + +import Reanimate +import Reanimate.Interpolate +import Reanimate.Builtin.Documentation +import Codec.Picture + +main :: IO () +main = reanimate $ docEnv $ animate $ const $ showColorMap $ interpolateRGB8 labComponents yellow blue + where + yellow = PixelRGB8 0xFF 0xFF 0x00 + blue = PixelRGB8 0x00 0x00 0xFF diff --git a/examples/doc_lchComponents.hs b/examples/doc_lchComponents.hs new file mode 100644 index 0000000..c21b4b5 --- /dev/null +++ b/examples/doc_lchComponents.hs @@ -0,0 +1,14 @@ +#!/usr/bin/env stack +-- stack runghc --package reanimate +module Main(main) where + +import Reanimate +import Reanimate.Interpolate +import Reanimate.Builtin.Documentation +import Codec.Picture + +main :: IO () +main = reanimate $ docEnv $ animate $ const $ showColorMap $ interpolateRGB8 lchComponents yellow blue + where + yellow = PixelRGB8 0xFF 0xFF 0x00 + blue = PixelRGB8 0x00 0x00 0xFF diff --git a/examples/doc_xyzComponents.hs b/examples/doc_xyzComponents.hs new file mode 100644 index 0000000..59c70fd --- /dev/null +++ b/examples/doc_xyzComponents.hs @@ -0,0 +1,14 @@ +#!/usr/bin/env stack +-- stack runghc --package reanimate +module Main(main) where + +import Reanimate +import Reanimate.Interpolate +import Reanimate.Builtin.Documentation +import Codec.Picture + +main :: IO () +main = reanimate $ docEnv $ animate $ const $ showColorMap $ interpolateRGB8 rgbComponents yellow blue + where + yellow = PixelRGB8 0xFF 0xFF 0x00 + blue = PixelRGB8 0x00 0x00 0xFF