diagrams-contrib-1.1.1.2: Collection of user contributions to diagrams EDSL

Copyright(c) 2013 Michael Sloan
LicenseBSD-style (see LICENSE)
MaintainerMichael Sloan <mgsloan at gmail>
Safe HaskellNone
LanguageHaskell2010

Diagrams.Lens

Contents

Description

This module provides utilities for using Control.Lens with diagrams, including orphan instances for the Wrapped class.

Synopsis

Documentation

_P :: Iso (Point v) (Point v') v v' Source

Diagrams.Align

_envelopeVMove :: (Monoid a, HasOrigin a, Enveloped a, Num (Scalar (V a))) => V a -> Traversal' a (V a) Source

A singleton Traversal for an envelope vector, where modification of the vector moves the origin appropriately. No vector is traversed when the envelope is empty.

This is the same as _alignedVMove with 1 as the interpolation parameter.

_alignedVMove :: (Monoid a, HasOrigin a, Enveloped a, Num (Scalar (V a))) => V a -> Scalar (V a) -> Traversal' a (V a) Source

A singleton Traversal for an alignment vector, where modification of the vector moves the origin appropriately. No vector is traversed when the envelope is empty.

The interface mimics "Diagrams.Align.alignBy" in that the d parameter specifies an interpolation between two extremes of the envelope. d = 1 is on the envelope along the vector, whereas d = -1 is on the envelope, away from the vector.

If you need a Point instead of a vector, then compose with _P.

Diagrams.BoundingBox

_corners :: (HasBasis v, Ord (Basis v), AdditiveGroup (Scalar v), Ord (Scalar v), HasBasis v', Ord (Basis v'), AdditiveGroup (Scalar v'), Ord (Scalar v')) => Traversal (BoundingBox v) (BoundingBox v') (Point v) (Point v') Source

A traversal that either has 0 (empty box) or 2 points. These points are the lower and upper corners, respectively.

_boxExtents :: (HasBasis v, Ord (Basis v), AdditiveGroup (Scalar v), Ord (Scalar v)) => Lens' (BoundingBox v) v Source

A lens that gets the extents of the box. In order to change the extents, this modifies the upper corner.

Diagrams.Core.Style

Diagrams.Core.Types

Diagrams.Located

_Loc :: Iso (Located a) (Located a') (Point (V a), a) (Point (V a'), a') Source

Diagrams.Parametric

Diagrams.Segment

_straight :: Prism' (Segment Closed v) v Source

Prism that constructs linear segments. Can also destruct them, if the segment is Linear.

_bezier3 :: Prism' (Segment Closed v) (v, v, v) Source

Prism that constructs cubic bezier segments. Can also destruct them, if segment is a Cubic.

Diagrams.Trail