Copyright | Written by David Himmelstrup |
---|---|
License | Unlicense |
Maintainer | lemmih@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Internal tools for rastering SVGs and rendering videos. You are unlikely to ever directly use the functions in this module.
Synopsis
- render :: Animation -> FilePath -> Raster -> Format -> Width -> Height -> FPS -> Bool -> IO ()
- renderSvgs :: FilePath -> Int -> Bool -> Animation -> IO ()
- renderSvgs_ :: Animation -> (Int -> FilePath -> IO ()) -> IO ()
- renderSnippets :: Animation -> IO ()
- renderLimitedFrames :: FilePath -> Int -> Bool -> Int -> Animation -> IO ()
- data Format
- data Raster
- type Width = Int
- type Height = Int
- type FPS = Int
- requireRaster :: Raster -> IO Raster
- selectRaster :: Raster -> IO Raster
- applyRaster :: Raster -> FilePath -> IO ()
Documentation
render :: Animation -> FilePath -> Raster -> Format -> Width -> Height -> FPS -> Bool -> IO () Source #
Render animation to a video file with given parameters.
renderSvgs :: FilePath -> Int -> Bool -> Animation -> IO () Source #
Generate SVGs at 60fps and put them in a folder.
renderSnippets :: Animation -> IO () Source #
Render 10 frames and print them to stdout. Used for testing.
XXX: Not related to the snippets in the playground.
renderLimitedFrames :: FilePath -> Int -> Bool -> Int -> Animation -> IO () Source #
Render as many frames as possible in 2 seconds. Limited to 20 frames.
Video formats supported by reanimate.
Raster engines turn SVG images into pixels.
RasterNone | Do not use any external raster engine. Rely on the browser or ffmpeg. |
RasterAuto | Scan for installed raster engines and pick the fastest one. |
RasterInkscape | Use Inkscape to raster SVG images. |
RasterRSvg | Use rsvg-convert to raster SVG images. |
RasterMagick | Use imagemagick to raster SVG images. |
requireRaster :: Raster -> IO Raster Source #
Resolve RasterNone and RasterAuto. If no valid raster can be found, exit with an error message.