Hoogle Search
Within LTS Haskell 24.69 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
lineOffset :: (Metric v, OrderedField n) => Trail' Line v n -> v ndiagrams-lib Diagrams Compute the offset from the start of a line to the end. (Note, there is no corresponding loopOffset function because by definition it would be constantly zero.)
lineOffsets :: Trail' Line v n -> [v n]diagrams-lib Diagrams Extract the offsets of the segments of a line.
loopOffsets :: (Metric v, OrderedField n) => Trail' Loop v n -> [v n]diagrams-lib Diagrams Extract the offsets of the segments of a loop.
offset :: (OrderedField n, Metric v, Measured (SegMeasure v n) t) => t -> v ndiagrams-lib Diagrams Compute the total offset of anything measured by SegMeasure.
pathOffsets :: (Metric v, OrderedField n) => Path v n -> [v n]diagrams-lib Diagrams Compute the total offset of each trail comprising a path (see trailOffset).
reverseTrail :: forall (v :: Type -> Type) n . (Metric v, OrderedField n) => Trail v n -> Trail v ndiagrams-lib Diagrams Reverse a trail. Semantically, if a trail given by a function t from [0,1] to vectors, then the reverse of t is given by t'(s) = t(1-s). reverseTrail is an involution, that is,
reverseTrail . reverseTrail === id
trailFromOffsets :: (Metric v, OrderedField n) => [v n] -> Trail v ndiagrams-lib Diagrams trailFromOffsets === wrapTrail . lineFromOffsets, for conveniently constructing a Trail instead of a Trail' Line.
trailOffset :: (Metric v, OrderedField n) => Trail v n -> v ndiagrams-lib Diagrams Compute the offset from the start of a trail to the end. Satisfies
trailOffset === sumV . trailOffsets
but is more efficient.trailOffsetEx = (strokeLine almostClosed <> showOffset) # centerXY # pad 1.1 where showOffset = fromOffsets [trailOffset (wrapLine almostClosed)] # strokeP # lc red
trailOffsets :: (Metric v, OrderedField n) => Trail v n -> [v n]diagrams-lib Diagrams Extract the offsets of the segments of a trail.
pathOffsets :: (Metric v, OrderedField n) => Path v n -> [v n]diagrams-lib Diagrams.Path Compute the total offset of each trail comprising a path (see trailOffset).