reanimate/examples/doc_pathify.hs
Jan Hrček a66276a4d4 Extent pathify to work for elipses, polylines and polygons
Former-commit-id: f89ff11a1b57ac93f326d0443befdf3e7042e4ea
2020-01-06 08:00:08 +08:00

19 lines
503 B
Haskell
Executable file

#!/usr/bin/env stack
-- stack runghc --package reanimate
module Main (main) where
import Reanimate
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv pathifyExample
pathifyExample :: Animation
pathifyExample = animate $ \t -> gridLayout
[ [ partialSvg t $ pathify $ mkCircle 1
, partialSvg t $ pathify $ mkRect 2 2
]
, [ partialSvg t $ pathify $ mkEllipse 1 0.5
, partialSvg t $ pathify $ mkLine (-1, -1) (1, 1)
]
]