Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data PathJoin d j = PJ {}
- j :: forall d j j. Lens (PathJoin d j) (PathJoin d j) j j
- d2 :: forall d j. Lens' (PathJoin d j) d
- d1 :: forall d j. Lens' (PathJoin d j) d
- data PathDir
- isCurl :: PathDir -> Bool
- type Curl = Double
- type Dir = R2
- type BasicJoin = Either TensionJoin ControlJoin
- data Tension
- getTension :: Tension -> Double
- data TensionJoin = TJ {}
- data ControlJoin = CJ {}
- t2 :: Lens' TensionJoin Tension
- t1 :: Lens' TensionJoin Tension
- c2 :: Lens' ControlJoin P2
- c1 :: Lens' ControlJoin P2
- data P
- data J
- data MFPathData a where
- MFPathCycle :: MFPathData P
- MFPathEnd :: P2 -> MFPathData P
- MFPathPt :: P2 -> MFPathData J -> MFPathData P
- MFPathJoin :: PathJoin (Maybe PathDir) (Maybe BasicJoin) -> MFPathData P -> MFPathData J
- data MetafontSegment d j = MFS {}
- data MFPath d j = MFP {
- _loop :: Bool
- _segs :: [MetafontSegment d j]
- type MFP = MFPath (Maybe PathDir) BasicJoin
- type MFS = MetafontSegment (Maybe PathDir) BasicJoin
- x2 :: forall d j. Lens' (MetafontSegment d j) P2
- x1 :: forall d j. Lens' (MetafontSegment d j) P2
- pj :: forall d j d j. Lens (MetafontSegment d j) (MetafontSegment d j) (PathJoin d j) (PathJoin d j)
- segs :: forall d j d j. Lens (MFPath d j) (MFPath d j) [MetafontSegment d j] [MetafontSegment d j]
- loop :: forall d j. Lens' (MFPath d j) Bool
Documentation
A PathJoin
specifies the directions at both ends of a segment,
and a join which describes the control points explicitly or implicitly.
A direction can be specified at any point of a path. A curl should only be specified at the endpoints. The endpoints default to curl 1 if not set.
type BasicJoin = Either TensionJoin ControlJoin Source
Higher Tension brings the path closer to a straight line
between segments. Equivalently, it brings the control points
closer to the endpoints. TensionAmt
introduces a fixed tension.
TensionAtLeast
introduces a tension which will be increased if by
so doing, an inflection point can be eliminated.
getTension :: Tension -> Double Source
data TensionJoin Source
Two tensions and two directions completely determine the control points of a segment.
data ControlJoin Source
The two intermediate control points of a segment, specified directly.
c2 :: Lens' ControlJoin P2 Source
c1 :: Lens' ControlJoin P2 Source
data MFPathData a where Source
MFPathData
is the type manipulated by the metafont combinators.
MFPathCycle :: MFPathData P | |
MFPathEnd :: P2 -> MFPathData P | |
MFPathPt :: P2 -> MFPathData J -> MFPathData P | |
MFPathJoin :: PathJoin (Maybe PathDir) (Maybe BasicJoin) -> MFPathData P -> MFPathData J |
data MetafontSegment d j Source
MetafontSegment
is used internally in solving the metafont
equations. It represents a segment with two known endpoints, and a
join, which may be specified in various ways.
Functor (MetafontSegment d) | |
(Show d, Show j) => Show (MetafontSegment d j) |
MFPath
is the type used internally in solving the metafont
equations. The direction and join types are progressively refined
until all control points are known. The loop
flag affects both
the equations to be solved and the type of Trail
in the result.
If constructing an MFPath
in new code, the responsibility rests
on the user to ensure that successive MetafontSegment
s share an
endpoint. If this is not true, the result is undefined.
MFP | |
|
type MFP = MFPath (Maybe PathDir) BasicJoin Source
MFP is a type synonym to clarify signatures in Metafont.Internal.
Note that the type permits segments which are "overspecified",
having one or both directions specified, and also a ControlJoin
.
In this case, Metafont.Internal ignores the directions.
type MFS = MetafontSegment (Maybe PathDir) BasicJoin Source
MFS is a type synonym to clarify signatures in Metafont.Internal.
x2 :: forall d j. Lens' (MetafontSegment d j) P2 Source
x1 :: forall d j. Lens' (MetafontSegment d j) P2 Source
pj :: forall d j d j. Lens (MetafontSegment d j) (MetafontSegment d j) (PathJoin d j) (PathJoin d j) Source
segs :: forall d j d j. Lens (MFPath d j) (MFPath d j) [MetafontSegment d j] [MetafontSegment d j] Source