Copyright | (c) 2013 Michael Sloan |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Michael Sloan <mgsloan at gmail> |
Safe Haskell | None |
Language | Haskell2010 |
This module provides utilities for using Control.Lens with diagrams.
- _corners :: (Additive v', Foldable v', Ord n') => Traversal (BoundingBox v n) (BoundingBox v' n') (Point v n) (Point v' n')
- _location :: (HasLinearMap v, Metric v, OrderedField n) => Lens' (Subdiagram b v n m) (Point v n)
- _Loc :: Iso (Located a) (Located a') (Point (V a) (N a), a) (Point (V a') (N a'), a')
- _mkFixedSeg :: (Additive v, Additive v', Num n, Num n') => Iso (Located (Segment Closed v n)) (Located (Segment Closed v' n')) (FixedSegment v n) (FixedSegment v' n')
- _straight :: Prism' (Segment Closed v n) (v n)
- _bezier3 :: Prism' (Segment Closed v n) (v n, v n, v n)
- _lineSegments :: (Metric v', OrderedField n') => Iso (Trail' Line v n) (Trail' Line v' n') [Segment Closed v n] [Segment Closed v' n']
Diagrams.BoundingBox
_corners :: (Additive v', Foldable v', Ord n') => Traversal (BoundingBox v n) (BoundingBox v' n') (Point v n) (Point v' n') Source #
A traversal that either has 0 (empty box) or 2 points. These points are the lower and upper corners, respectively.
Diagrams.Core.Types
_location :: (HasLinearMap v, Metric v, OrderedField n) => Lens' (Subdiagram b v n m) (Point v n) Source #
Gets or set the location
of a Subdiagram
.
Diagrams.Located
Diagrams.Parametric
Diagrams.Segment
_mkFixedSeg :: (Additive v, Additive v', Num n, Num n') => Iso (Located (Segment Closed v n)) (Located (Segment Closed v' n')) (FixedSegment v n) (FixedSegment v' n') Source #
_straight :: Prism' (Segment Closed v n) (v n) Source #
Prism that constructs linear segments. Can also destruct them, if the segment is Linear.
_bezier3 :: Prism' (Segment Closed v n) (v n, v n, v n) Source #
Prism that constructs cubic bezier segments. Can also destruct them, if
segment is a Cubic
.