reanimate-0.4.2.0: Animation library based on SVGs.

CopyrightWritten by David Himmelstrup
LicenseUnlicense
Maintainerlemmih@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Reanimate.Render

Description

Internal tools for rastering SVGs and rendering videos. You are unlikely to ever directly use the functions in this module.

Synopsis

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.

renderOneFrame :: FilePath -> Int -> Bool -> Int -> Animation -> IO () Source #

Select a single frame that doesn't already exist in the output folder and render it. If all frames have been rendered, print Done.

data Format Source #

Video formats supported by reanimate.

Instances
Show Format Source # 
Instance details

Defined in Reanimate.Render

data Raster Source #

Raster engines turn SVG images into pixels.

Constructors

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.

Instances
Eq Raster Source # 
Instance details

Defined in Reanimate.Parameters

Methods

(==) :: Raster -> Raster -> Bool #

(/=) :: Raster -> Raster -> Bool #

Show Raster Source # 
Instance details

Defined in Reanimate.Parameters

type Width = Int Source #

Width of animation in pixels.

type Height = Int Source #

Height of animation in pixels.

type FPS = Int Source #

Framerate of animation in frames per second.

requireRaster :: Raster -> IO Raster Source #

Resolve RasterNone and RasterAuto. If no valid raster can be found, exit with an error message.

selectRaster :: Raster -> IO Raster Source #

Resolve RasterNone and RasterAuto. If no valid raster can be found, return RasterNone.

applyRaster :: Raster -> FilePath -> IO () Source #

Convert SVG file to a PNG file with selected raster engine. If raster engine is RasterAuto or RasterNone, do nothing.