Safe Haskell | None |
---|---|
Language | Haskell2010 |
Combinators to allow writing Metafont-style paths embedded in Haskell, with the usual Diagrams types for points and directions.
- (.-) :: P2 n -> MFPathData J n -> MFPathData P n
- (-.) :: Join n -> MFPathData P n -> MFPathData J n
- (.--.) :: P2 n -> MFPathData P n -> MFPathData P n
- endpt :: P2 n -> MFPathData P n
- cyclePath :: MFPathData P n
- simpleJoin :: Join n
- tension :: n -> Join n
- tensions :: n -> n -> Join n
- controls :: P2 n -> P2 n -> Join n
- leaving :: V2 n -> Join n
- arriving :: V2 n -> Join n
Documentation
(.-) :: P2 n -> MFPathData J n -> MFPathData P n infixr 5 Source
point .-
join -.
path adds point to the
left end of the metafont path, connected by join.
(-.) :: Join n -> MFPathData P n -> MFPathData J n infixr 5 Source
See .-
above.
(.--.) :: P2 n -> MFPathData P n -> MFPathData P n infixr 5 Source
Add a point to the left of a Metafont path using a simple join. That is, neither direction is specified, and both tensions are 1.
endpt :: P2 n -> MFPathData P n Source
Terminate the right-end of a Metafont path at the given point.
cyclePath :: MFPathData P n Source
Wrap the right-end of the Metafont path back to the left-end.
When converted to a Diagrams Trail'
, this will be a Loop.
simpleJoin :: Join n Source
simpleJoin is the same as mempty, with a more specific type. It is provided for convenience in situations where explicit type signatures would otherwise be needed, such as when building up a join using lenses.