reanimate-0.4.2.0: Animation library based on SVGs.

Copyright Written by David Himmelstrup Unlicense lemmih@gmail.com experimental POSIX None Haskell2010

Reanimate.Svg.LineCommand

Description

Synopsis

# Documentation

type CmdM a = State RPoint a Source #

Line command monad used for keeping track of the current location.

Simplified version of a PathCommand where all points are absolute.

Constructors

 LineMove RPoint LineBezier [RPoint] LineDraw RPoint LineEnd RPoint
Instances
 Source # Instance detailsDefined in Reanimate.Svg.LineCommand MethodsshowList :: [LineCommand] -> ShowS #

Estimated length of all segments in a line.

toLineCommands :: [PathCommand] -> [LineCommand] Source #

Convert from path commands to line commands.

lineToPath :: [LineCommand] -> [PathCommand] Source #

Convert from line commands to path commands.

lineToPoints :: Int -> [LineCommand] -> [RPoint] Source #

Using n control points, approximate the path of the curves.

Arguments

 :: Double number between 0 and 1 inclusively, determining what portion of the path to show -> Tree Image representing a path, of which we only want to display a portion determined by the first argument -> Tree

Create an image showing portion of a path. Note that this only affects paths (see mkPath). You can also use this with other SVG shapes if you convert them to path first (see pathify).

Typical usage:

animate \$ \t -> partialSvg t myPath