reanimate-1.1.5.0: Animation library based on SVGs.
CopyrightWritten by David Himmelstrup
LicenseUnlicense
Maintainerlemmih@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Reanimate.Svg.LineCommand

Description

 
Synopsis

Documentation

type CmdM a = State RPoint a Source #

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

data LineCommand Source #

Simplified version of a PathCommand where all points are absolute.

Constructors

LineMove RPoint 
LineBezier [RPoint]

LineDraw RPoint

LineEnd RPoint 

Instances

Instances details
Show LineCommand Source # 
Instance details

Defined in Reanimate.Svg.LineCommand

lineLength :: LineCommand -> CmdM Double Source #

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.

partialSvg Source #

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