Copyright | Written by David Himmelstrup |
---|---|
License | Unlicense |
Maintainer | lemmih@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- type CmdM a = State RPoint a
- data LineCommand
- lineLength :: LineCommand -> CmdM Double
- toLineCommands :: [PathCommand] -> [LineCommand]
- lineToPath :: [LineCommand] -> [PathCommand]
- lineToPoints :: Int -> [LineCommand] -> [RPoint]
- partialSvg :: Double -> Tree -> Tree
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.
Instances
Show LineCommand Source # | |
Defined in Reanimate.Svg.LineCommand showsPrec :: Int -> LineCommand -> ShowS # show :: LineCommand -> String # showList :: [LineCommand] -> ShowS # |
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.