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.

  1. trailOffsets :: (Metric v, OrderedField n) => Trail v n -> [v n]

    diagrams-lib Diagrams.Trail

    Extract the offsets of the segments of a trail.

  2. fromLocOffsets :: (V t ~ v, N t ~ n, V (v n) ~ v, N (v n) ~ n, TrailLike t) => Located [v n] -> t

    diagrams-lib Diagrams.TrailLike

    Construct a trail-like thing of linear segments from a located list of offsets.

  3. fromOffsets :: TrailLike t => [Vn t] -> t

    diagrams-lib Diagrams.TrailLike

    Construct a trail-like thing of linear segments from a list of offsets, with the origin as the location.

    fromOffsetsEx = fromOffsets
    [ unitX
    , unitX # rotateBy (1/6)
    , unitX # rotateBy (-1/6)
    , unitX
    ]
    # centerXY # pad 1.1
    

  4. module Diagrams.TwoD.Offset

    Compute offsets to segments in two dimensions. More details can be found in the manual at https://diagrams.github.io/doc/manual.html#offsets-of-segments-trails-and-paths.

  5. data OffsetOpts d

    diagrams-lib Diagrams.TwoD.Offset

    Compute the offset of a segment. Given a segment compute the offset curve that is a fixed distance from the original curve. For linear segments nothing special happens, the same linear segment is returned with a point that is offset by a perpendicular vector of the given offset length. Cubic segments require a search for a subdivision of cubic segments that gives an approximation of the offset within the given epsilon factor (the given epsilon factor is applied to the radius giving a concrete epsilon value). We must do this because the offset of a cubic is not a cubic itself (the degree of the curve increases). Cubics do, however, approach constant curvature as we subdivide. In light of this we scale the handles of the offset cubic segment in proportion to the radius of curvature difference between the original subsegment and the offset which will have a radius increased by the offset parameter. In the following example the blue lines are the original segments and the alternating green and red lines are the resulting offset trail segments. Note that when the original curve has a cusp, the offset curve forms a radius around the cusp, and when there is a loop in the original curve, there can be two cusps in the offset curve. Options for specifying line join and segment epsilon for an offset involving multiple segments.

  6. OffsetOpts :: LineJoin -> d -> d -> OffsetOpts d

    diagrams-lib Diagrams.TwoD.Offset

    No documentation available.

  7. _offsetEpsilon :: OffsetOpts d -> d

    diagrams-lib Diagrams.TwoD.Offset

    No documentation available.

  8. _offsetJoin :: OffsetOpts d -> LineJoin

    diagrams-lib Diagrams.TwoD.Offset

    No documentation available.

  9. _offsetMiterLimit :: OffsetOpts d -> d

    diagrams-lib Diagrams.TwoD.Offset

    No documentation available.

  10. offsetEpsilon :: forall d f . Functor f => (d -> f d) -> OffsetOpts d -> f (OffsetOpts d)

    diagrams-lib Diagrams.TwoD.Offset

    Epsilon perimeter for offsetSegment.

Page 1215 of many | Previous | Next