mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-14 09:32:22 +00:00
Local web viewer.
This commit is contained in:
parent
d1d1906250
commit
41c30b453b
19 changed files with 16998 additions and 9 deletions
25
examples/latex_color.hs
Executable file
25
examples/latex_color.hs
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env stack
|
||||
-- stack --resolver lts-11.22 runghc --package reanimate
|
||||
module Main (main) where
|
||||
|
||||
import Control.Lens
|
||||
|
||||
import Graphics.SvgTree (Number(..))
|
||||
import Reanimate.Driver (reanimate)
|
||||
import Reanimate.LaTeX (latex)
|
||||
import Reanimate.Monad (emit, mkAnimation)
|
||||
import Reanimate.Svg
|
||||
|
||||
main :: IO ()
|
||||
main = reanimate $ mkAnimation 1 $ do
|
||||
emit $ mkBackground "black"
|
||||
emit $ withStrokeWidth (Num 0.1) $
|
||||
withStrokeColor "white" $
|
||||
withSubglyphs [0] (withFillColor "blue") $
|
||||
withSubglyphs [1] (withFillColor "yellow") $
|
||||
withSubglyphs [2] (withFillColor "green") $
|
||||
withSubglyphs [3] (withFillColor "red") $
|
||||
withSubglyphs [4] (withFillColor "darkslategrey") $
|
||||
svg
|
||||
where
|
||||
svg = scale 10 $ center $ latex "\\LaTeX"
|
||||
Loading…
Reference in a new issue