diagrams-lib-1.5.1: Embedded domain-specific language for declarative graphics

Copyright | (c) 2011-2015 diagrams-lib team (see LICENSE)
License | BSD-style (see LICENSE)
Maintainer | diagrams-discuss@googlegroups.com
Safe Haskell | None
Language | Haskell2010

Diagrams.TwoD.Path

Contents

- Constructing path-based diagrams
  - Stroke options
  - Inside/outside testing
- Clipping
- Intersections
- Orphan instances

Description

Paths in two dimensions are special since we may stroke them to create a 2D diagram, and (eventually) perform operations such as intersection and union. They also have a trace, whereas paths in higher dimensions do not.

Synopsis

- stroke :: (InSpace V2 n t, ToPath t, TypeableFloat n, Renderable (Path V2 n) b) => t -> QDiagram b V2 n Any
- stroke' :: (InSpace V2 n t, ToPath t, TypeableFloat n, Renderable (Path V2 n) b, IsName a) => StrokeOpts a -> t -> QDiagram b V2 n Any
- strokePath :: (TypeableFloat n, Renderable (Path V2 n) b) => Path V2 n -> QDiagram b V2 n Any
- strokeP :: (TypeableFloat n, Renderable (Path V2 n) b) => Path V2 n -> QDiagram b V2 n Any
- strokePath' :: (TypeableFloat n, Renderable (Path V2 n) b, IsName a) => StrokeOpts a -> Path V2 n -> QDiagram b V2 n Any
- strokeP' :: (TypeableFloat n, Renderable (Path V2 n) b, IsName a) => StrokeOpts a -> Path V2 n -> QDiagram b V2 n Any
- strokeTrail :: (TypeableFloat n, Renderable (Path V2 n) b) => Trail V2 n -> QDiagram b V2 n Any
- strokeT :: (TypeableFloat n, Renderable (Path V2 n) b) => Trail V2 n -> QDiagram b V2 n Any
- strokeTrail' :: (TypeableFloat n, Renderable (Path V2 n) b, IsName a) => StrokeOpts a -> Trail V2 n -> QDiagram b V2 n Any
- strokeT' :: (TypeableFloat n, Renderable (Path V2 n) b, IsName a) => StrokeOpts a -> Trail V2 n -> QDiagram b V2 n Any
- strokeLine :: (TypeableFloat n, Renderable (Path V2 n) b) => Trail' Line V2 n -> QDiagram b V2 n Any
- strokeLoop :: (TypeableFloat n, Renderable (Path V2 n) b) => Trail' Loop V2 n -> QDiagram b V2 n Any
- strokeLocTrail :: (TypeableFloat n, Renderable (Path V2 n) b) => Located (Trail V2 n) -> QDiagram b V2 n Any
- strokeLocT :: (TypeableFloat n, Renderable (Path V2 n) b) => Located (Trail V2 n) -> QDiagram b V2 n Any
- strokeLocLine :: (TypeableFloat n, Renderable (Path V2 n) b) => Located (Trail' Line V2 n) -> QDiagram b V2 n Any
- strokeLocLoop :: (TypeableFloat n, Renderable (Path V2 n) b) => Located (Trail' Loop V2 n) -> QDiagram b V2 n Any
- data FillRule
  - = Winding
  - | EvenOdd
- getFillRule :: FillRule -> FillRule
- fillRule :: HasStyle a => FillRule -> a -> a
- _fillRule :: forall n f. Functor f => (FillRule -> f FillRule) -> Style V2 n -> f (Style V2 n)
- data StrokeOpts a = StrokeOpts {
  - _vertexNames :: [[a]]
  - _queryFillRule :: FillRule
  }
- vertexNames :: forall a a' f. Functor f => ([[a]] -> f [[a']]) -> StrokeOpts a -> f (StrokeOpts a')
- queryFillRule :: forall a f. Functor f => (FillRule -> f FillRule) -> StrokeOpts a -> f (StrokeOpts a)
- newtype Crossings = Crossings Int
- isInsideWinding :: HasQuery t Crossings => t -> Point (V t) (N t) -> Bool
- isInsideEvenOdd :: HasQuery t Crossings => t -> Point (V t) (N t) -> Bool
- newtype Clip n = Clip [Path V2 n]
- _Clip :: forall n n' p f. (Profunctor p, Functor f) => p [Path V2 n] (f [Path V2 n']) -> p (Clip n) (f (Clip n'))
- _clip :: (Typeable n, OrderedField n) => Lens' (Style V2 n) [Path V2 n]
- clipBy :: (HasStyle a, V a ~ V2, N a ~ n, TypeableFloat n) => Path V2 n -> a -> a
- clipTo :: TypeableFloat n => Path V2 n -> QDiagram b V2 n Any -> QDiagram b V2 n Any
- clipped :: TypeableFloat n => Path V2 n -> QDiagram b V2 n Any -> QDiagram b V2 n Any
- intersectPoints :: (InSpace V2 n t, SameSpace t s, ToPath t, ToPath s, OrderedField n) => t -> s -> [P2 n]
- intersectPoints' :: (InSpace V2 n t, SameSpace t s, ToPath t, ToPath s, OrderedField n) => n -> t -> s -> [P2 n]
- intersectPointsP :: OrderedField n => Path V2 n -> Path V2 n -> [P2 n]
- intersectPointsP' :: OrderedField n => n -> Path V2 n -> Path V2 n -> [P2 n]
- intersectPointsT :: OrderedField n => Located (Trail V2 n) -> Located (Trail V2 n) -> [P2 n]
- intersectPointsT' :: OrderedField n => n -> Located (Trail V2 n) -> Located (Trail V2 n) -> [P2 n]

# Constructing path-based diagrams

stroke :: (InSpace V2 n t, ToPath t, TypeableFloat n, Renderable (Path V2 n) b) => t -> QDiagram b V2 n Any Source #

Convert a `ToPath` object into a diagram. The resulting diagram has the names 0, 1, ... assigned to each of the path's vertices.

See also `stroke'`, which takes an extra options record allowing its behaviour to be customized.

    stroke :: Path V2 Double                  -> Diagram b
    stroke :: Located (Trail V2 Double)       -> Diagram b
    stroke :: Located (Trail' Loop V2 Double) -> Diagram b
    stroke :: Located (Trail' Line V2 Double) -> Diagram b

stroke' :: (InSpace V2 n t, ToPath t, TypeableFloat n, Renderable (Path V2 n) b, IsName a) => StrokeOpts a -> t -> QDiagram b V2 n Any Source #

A variant of `stroke` that takes an extra record of options to customize its behaviour. In particular:

- Names can be assigned to the path's vertices

`StrokeOpts` is an instance of `Default`, so `stroke' (`with` & ... )` syntax may be used.

strokePath :: (TypeableFloat n, Renderable (Path V2 n) b) => Path V2 n -> QDiagram b V2 n Any Source #

`stroke` specialised to `Path`.

strokeP :: (TypeableFloat n, Renderable (Path V2 n) b) => Path V2 n -> QDiagram b V2 n Any Source #

`stroke` specialised to `Path`.

strokePath' :: (TypeableFloat n, Renderable (Path V2 n) b, IsName a) => StrokeOpts a -> Path V2 n -> QDiagram b V2 n Any Source #

`stroke'` specialised to `Path`.

strokeP' :: (TypeableFloat n, Renderable (Path V2 n) b, IsName a) => StrokeOpts a -> Path V2 n -> QDiagram b V2 n Any Source #

`stroke'` specialised to `Path`.

strokeTrail :: (TypeableFloat n, Renderable (Path V2 n) b) => Trail V2 n -> QDiagram b V2 n Any Source #

`stroke` specialised to `Trail`.

strokeT :: (TypeableFloat n, Renderable (Path V2 n) b) => Trail V2 n -> QDiagram b V2 n Any Source #

`stroke` specialised to `Trail`.

strokeTrail' :: (TypeableFloat n, Renderable (Path V2 n) b, IsName a) => StrokeOpts a -> Trail V2 n -> QDiagram b V2 n Any Source #

A composition of `stroke'` and `pathFromTrail` for conveniently converting a trail directly into a diagram.

strokeT' :: (TypeableFloat n, Renderable (Path V2 n) b, IsName a) => StrokeOpts a -> Trail V2 n -> QDiagram b V2 n Any Source #

Deprecated synonym for `strokeTrail'`.

strokeLine :: (TypeableFloat n, Renderable (Path V2 n) b) => Trail' Line V2 n -> QDiagram b V2 n Any Source #

A composition of `strokeT` and `wrapLine` for conveniently converting a line directly into a diagram.

strokeLoop :: (TypeableFloat n, Renderable (Path V2 n) b) => Trail' Loop V2 n -> QDiagram b V2 n Any Source #

A composition of `strokeT` and `wrapLoop` for conveniently converting a loop directly into a diagram.

strokeLocTrail :: (TypeableFloat n, Renderable (Path V2 n) b) => Located (Trail V2 n) -> QDiagram b V2 n Any Source #

A convenience function for converting a `Located Trail` directly into a diagram; `strokeLocTrail = stroke . trailLike`.

strokeLocT :: (TypeableFloat n, Renderable (Path V2 n) b) => Located (Trail V2 n) -> QDiagram b V2 n Any Source #

Deprecated synonym for `strokeLocTrail`.

strokeLocLine :: (TypeableFloat n, Renderable (Path V2 n) b) => Located (Trail' Line V2 n) -> QDiagram b V2 n Any Source #

A convenience function for converting a `Located` line directly into a diagram; `strokeLocLine = stroke . trailLike . mapLoc wrapLine`.

strokeLocLoop :: (TypeableFloat n, Renderable (Path V2 n) b) => Located (Trail' Loop V2 n) -> QDiagram b V2 n Any Source #

A convenience function for converting a `Located` loop directly into a diagram; `strokeLocLoop = stroke . trailLike . mapLoc wrapLoop`.

## Stroke options

data FillRule Source #

Enumeration of algorithms or "rules" for determining which points lie in the interior of a (possibly self-intersecting) path.

Constructors

Winding | Interior points are those with a nonzero winding number. See http://en.wikipedia.org/wiki/Nonzero-rule.
EvenOdd | Interior points are those where a ray extended infinitely in a particular direction crosses the path an odd number of times. See http://en.wikipedia.org/wiki/Even-odd_rule.

#### Instances

Instances details

Default FillRule Source # |
Instance details Defined in Diagrams.TwoD.Path Methods def :: FillRule Source #
AttributeClass FillRule Source # |
Instance details Defined in Diagrams.TwoD.Path
Semigroup FillRule Source # |
Instance details Defined in Diagrams.TwoD.Path Methods (<>) :: FillRule -> FillRule -> FillRule Source # sconcat :: NonEmpty FillRule -> FillRule Source # stimes :: Integral b => b -> FillRule -> FillRule Source #
Show FillRule Source # |
Instance details Defined in Diagrams.TwoD.Path Methods showsPrec :: Int -> FillRule -> ShowS Source # show :: FillRule -> String Source # showList :: [FillRule] -> ShowS Source #
Eq FillRule Source # |
Instance details Defined in Diagrams.TwoD.Path Methods (==) :: FillRule -> FillRule -> Bool Source # (/=) :: FillRule -> FillRule -> Bool Source #
Ord FillRule Source # |
Instance details Defined in Diagrams.TwoD.Path Methods compare :: FillRule -> FillRule -> Ordering Source # (<) :: FillRule -> FillRule -> Bool Source # (<=) :: FillRule -> FillRule -> Bool Source # (>) :: FillRule -> FillRule -> Bool Source # (>=) :: FillRule -> FillRule -> Bool Source # max :: FillRule -> FillRule -> FillRule Source # min :: FillRule -> FillRule -> FillRule Source #

getFillRule :: FillRule -> FillRule Source #

Extract the fill rule from a `FillRuleA` attribute.

fillRule :: HasStyle a => FillRule -> a -> a Source #

Specify the fill rule that should be used for determining which points are inside a path.

_fillRule :: forall n f. Functor f => (FillRule -> f FillRule) -> Style V2 n -> f (Style V2 n) Source #

Lens onto the fill rule of a style.

data StrokeOpts a Source #

A record of options that control how a path is stroked. `StrokeOpts` is an instance of `Default`, so a `StrokeOpts` records can be created using ``with` { ... }` notation.

Constructors

StrokeOpts |

Fields

- _vertexNames :: [[a]]
- _queryFillRule :: FillRule

#### Instances

Instances details

Default (StrokeOpts a) Source # |
Instance details Defined in Diagrams.TwoD.Path Methods def :: StrokeOpts a Source #

vertexNames :: forall a a' f. Functor f => ([[a]] -> f [[a']]) -> StrokeOpts a -> f (StrokeOpts a') Source #

Atomic names that should be assigned to the vertices of the path so that they can be referenced later. If there are not enough names, the extra vertices are not assigned names; if there are too many, the extra names are ignored. Note that this is a list of lists of names, since paths can consist of multiple trails. The first list of names are assigned to the vertices of the first trail, the second list to the second trail, and so on.

The default value is the empty list.

queryFillRule :: forall a f. Functor f => (FillRule -> f FillRule) -> StrokeOpts a -> f (StrokeOpts a) Source #

The fill rule used for determining which points are inside the path. The default is `Winding`. NOTE: for now, this only affects the resulting diagram's `Query`, not how it will be drawn! To set the fill rule determining how it is to be drawn, use the `fillRule` function.

## Inside/outside testing

newtype Crossings Source #

The sum of signed crossings of a path as we travel in the positive x direction from a given point.

- A point is filled according to the `Winding` fill rule, if the number of `Crossings` is non-zero (see `isInsideWinding`).
- A point is filled according to the `EvenOdd` fill rule, if the number of `Crossings` is odd (see `isInsideEvenOdd`).

This is the `HasQuery` result for `Path`s, `Located` `Trail`s and `Located` `Loops`.

    sample :: Path V2 Double                  -> Point V2 Double -> Crossings
    sample :: Located (Trail V2 Double)       -> Point V2 Double -> Crossings
    sample :: Located (Trail' Loop V2 Double) -> Point V2 Double -> Crossings

Note that `Line`s have no inside or outside, so don't contribute crossings

Constructors

Crossings Int |

#### Instances

Instances details

Monoid Crossings Source # |
Instance details Defined in Diagrams.TwoD.Path Methods mempty :: Crossings Source # mappend :: Crossings -> Crossings -> Crossings Source # mconcat :: [Crossings] -> Crossings Source #
Semigroup Crossings Source # |
Instance details Defined in Diagrams.TwoD.Path Methods (<>) :: Crossings -> Crossings -> Crossings Source # sconcat :: NonEmpty Crossings -> Crossings Source # stimes :: Integral b => b -> Crossings -> Crossings Source #
Enum Crossings Source # |

Instance details

Defined in Diagrams.TwoD.Path

Methods

succ :: Crossings -> Crossings Source #

pred :: Crossings -> Crossings Source #

toEnum :: Int -> Crossings Source #

fromEnum :: Crossings -> Int Source #

enumFrom :: Crossings -> [Crossings] Source #

enumFromThen :: Crossings -> Crossings -> [Crossings] Source #

enumFromTo :: Crossings -> Crossings -> [Crossings] Source #

enumFromThenTo :: Crossings -> Crossings -> Crossings -> [Crossings] Source #

Num Crossings Source # |
Instance details Defined in Diagrams.TwoD.Path Methods (+) :: Crossings -> Crossings -> Crossings Source # (-) :: Crossings -> Crossings -> Crossings Source # (*) :: Crossings -> Crossings -> Crossings Source # negate :: Crossings -> Crossings Source # abs :: Crossings -> Crossings Source # signum :: Crossings -> Crossings Source # fromInteger :: Integer -> Crossings Source #
Integral Crossings Source # |

Instance details

Defined in Diagrams.TwoD.Path

Methods

quot :: Crossings -> Crossings -> Crossings Source #

rem :: Crossings -> Crossings -> Crossings Source #

div :: Crossings -> Crossings -> Crossings Source #

mod :: Crossings -> Crossings -> Crossings Source #

quotRem :: Crossings -> Crossings -> (Crossings, Crossings) Source #

divMod :: Crossings -> Crossings -> (Crossings, Crossings) Source #

toInteger :: Crossings -> Integer Source #

Real Crossings Source # |
Instance details Defined in Diagrams.TwoD.Path Methods toRational :: Crossings -> Rational Source #
Show Crossings Source # |
Instance details Defined in Diagrams.TwoD.Path Methods showsPrec :: Int -> Crossings -> ShowS Source # show :: Crossings -> String Source # showList :: [Crossings] -> ShowS Source #
Eq Crossings Source # |
Instance details Defined in Diagrams.TwoD.Path Methods (==) :: Crossings -> Crossings -> Bool Source # (/=) :: Crossings -> Crossings -> Bool Source #
Ord Crossings Source # |

Instance details

Defined in Diagrams.TwoD.Path

Methods

compare :: Crossings -> Crossings -> Ordering Source #

(<) :: Crossings -> Crossings -> Bool Source #

(<=) :: Crossings -> Crossings -> Bool Source #

(>) :: Crossings -> Crossings -> Bool Source #

(>=) :: Crossings -> Crossings -> Bool Source #

max :: Crossings -> Crossings -> Crossings Source #

min :: Crossings -> Crossings -> Crossings Source #

RealFloat n => HasQuery (Located (Trail V2 n)) Crossings Source # |
Instance details Defined in Diagrams.TwoD.Path Methods getQuery :: Located (Trail V2 n) -> Query (V (Located (Trail V2 n))) (N (Located (Trail V2 n))) Crossings Source #
RealFloat n => HasQuery (Located (Trail' l V2 n)) Crossings Source # |
Instance details Defined in Diagrams.TwoD.Path Methods getQuery :: Located (Trail' l V2 n) -> Query (V (Located (Trail' l V2 n))) (N (Located (Trail' l V2 n))) Crossings Source #
RealFloat n => HasQuery (Path V2 n) Crossings Source # |
Instance details Defined in Diagrams.TwoD.Path Methods getQuery :: Path V2 n -> Query (V (Path V2 n)) (N (Path V2 n)) Crossings Source #

isInsideWinding :: HasQuery t Crossings => t -> Point (V t) (N t) -> Bool Source #

Test whether the given point is inside the given path, by testing whether the point's winding number is nonzero. Note that `False` is always returned for paths consisting of lines (as opposed to loops), regardless of the winding number.

    isInsideWinding :: Path V2 Double                  -> Point V2 Double -> Bool
    isInsideWinding :: Located (Trail V2 Double)       -> Point V2 Double -> Bool
    isInsideWinding :: Located (Trail' Loop V2 Double) -> Point V2 Double -> Bool

isInsideEvenOdd :: HasQuery t Crossings => t -> Point (V t) (N t) -> Bool Source #

Test whether the given point is inside the given path, by testing whether a ray extending from the point in the positive x direction crosses the path an even (outside) or odd (inside) number of times. Note that `False` is always returned for paths consisting of lines (as opposed to loops), regardless of the number of crossings.

    isInsideEvenOdd :: Path V2 Double                  -> Point V2 Double -> Bool
    isInsideEvenOdd :: Located (Trail V2 Double)       -> Point V2 Double -> Bool
    isInsideEvenOdd :: Located (Trail' Loop V2 Double) -> Point V2 Double -> Bool

# Clipping

newtype Clip n Source #

`Clip` tracks the accumulated clipping paths applied to a diagram. Note that the semigroup structure on `Clip` is list concatenation, so applying multiple clipping paths is sensible. The clipping region is the intersection of all the applied clipping paths.

Constructors

Clip [Path V2 n] |

#### Instances

Instances details

Typeable n => AttributeClass (Clip n) Source # |
Instance details Defined in Diagrams.TwoD.Path
OrderedField n => Transformable (Clip n) Source # |
Instance details Defined in Diagrams.TwoD.Path Methods transform :: Transformation (V (Clip n)) (N (Clip n)) -> Clip n -> Clip n Source #
Semigroup (Clip n) Source # |
Instance details Defined in Diagrams.TwoD.Path Methods (<>) :: Clip n -> Clip n -> Clip n Source # sconcat :: NonEmpty (Clip n) -> Clip n Source # stimes :: Integral b => b -> Clip n -> Clip n Source #
AsEmpty (Clip n) Source # |
Instance details Defined in Diagrams.TwoD.Path Methods _Empty :: Prism' (Clip n) () Source #
Wrapped (Clip n) Source # |

Instance details

Defined in Diagrams.TwoD.Path

Associated Types

type Unwrapped (Clip n) |
Instance details Defined in Diagrams.TwoD.Path type Unwrapped (Clip n) = [Path V2 n]

Methods

_Wrapped' :: Iso' (Clip n) (Unwrapped (Clip n)) Source #

RealFloat n => HasQuery (Clip n) All Source # | A point inside a clip if the point is in `All` invididual clipping paths.
Instance details Defined in Diagrams.TwoD.Path Methods getQuery :: Clip n -> Query (V (Clip n)) (N (Clip n)) All Source #
Clip n1 ~ t => Rewrapped (Clip n2) t Source # |
Instance details Defined in Diagrams.TwoD.Path
type N (Clip n) Source # |
Instance details Defined in Diagrams.TwoD.Path type N (Clip n) = n
type V (Clip n) Source # |
Instance details Defined in Diagrams.TwoD.Path type V (Clip n) = V2
type Unwrapped (Clip n) Source # |
Instance details Defined in Diagrams.TwoD.Path type Unwrapped (Clip n) = [Path V2 n]

_Clip :: forall n n' p f. (Profunctor p, Functor f) => p [Path V2 n] (f [Path V2 n']) -> p (Clip n) (f (Clip n')) Source #

_clip :: (Typeable n, OrderedField n) => Lens' (Style V2 n) [Path V2 n] Source #

Lens onto the Clip in a style. An empty list means no clipping.

clipBy :: (HasStyle a, V a ~ V2, N a ~ n, TypeableFloat n) => Path V2 n -> a -> a Source #

Clip a diagram by the given path:

- Only the parts of the diagram which lie in the interior of the path will be drawn.
- The envelope of the diagram is unaffected.

clipTo :: TypeableFloat n => Path V2 n -> QDiagram b V2 n Any -> QDiagram b V2 n Any Source #

Clip a diagram to the given path setting its envelope to the pointwise minimum of the envelopes of the diagram and path. The trace consists of those parts of the original diagram's trace which fall within the clipping path, or parts of the path's trace within the original diagram.

clipped :: TypeableFloat n => Path V2 n -> QDiagram b V2 n Any -> QDiagram b V2 n Any Source #

Clip a diagram to the clip path taking the envelope and trace of the clip path.

# Intersections

intersectPoints :: (InSpace V2 n t, SameSpace t s, ToPath t, ToPath s, OrderedField n) => t -> s -> [P2 n] Source #

Find the intersect points of two objects that can be converted to a path.

intersectPoints' :: (InSpace V2 n t, SameSpace t s, ToPath t, ToPath s, OrderedField n) => n -> t -> s -> [P2 n] Source #

Find the intersect points of two objects that can be converted to a path within the given tolerance.

intersectPointsP :: OrderedField n => Path V2 n -> Path V2 n -> [P2 n] Source #

Compute the intersect points between two paths.

intersectPointsP' :: OrderedField n => n -> Path V2 n -> Path V2 n -> [P2 n] Source #

Compute the intersect points between two paths within given tolerance.

intersectPointsT :: OrderedField n => Located (Trail V2 n) -> Located (Trail V2 n) -> [P2 n] Source #

Compute the intersect points between two located trails.

intersectPointsT' :: OrderedField n => n -> Located (Trail V2 n) -> Located (Trail V2 n) -> [P2 n] Source #

Compute the intersect points between two located trails within the given tolerance.

# Orphan instances

RealFloat n => HasQuery (Located (Trail V2 n)) Crossings Source # |
Instance details Methods getQuery :: Located (Trail V2 n) -> Query (V (Located (Trail V2 n))) (N (Located (Trail V2 n))) Crossings Source #
RealFloat n => HasQuery (Located (Trail' l V2 n)) Crossings Source # |
Instance details Methods getQuery :: Located (Trail' l V2 n) -> Query (V (Located (Trail' l V2 n))) (N (Located (Trail' l V2 n))) Crossings Source #
RealFloat n => Traced (Path V2 n) Source # |
Instance details Methods getTrace :: Path V2 n -> Trace (V (Path V2 n)) (N (Path V2 n)) Source #
RealFloat n => Traced (Trail V2 n) Source # |
Instance details Methods getTrace :: Trail V2 n -> Trace (V (Trail V2 n)) (N (Trail V2 n)) Source #
RealFloat n => HasQuery (Path V2 n) Crossings Source # |
Instance details Methods getQuery :: Path V2 n -> Query (V (Path V2 n)) (N (Path V2 n)) Crossings Source #
(TypeableFloat n, Renderable (Path V2 n) b) => TrailLike (QDiagram b V2 n Any) Source # |
Instance details Methods trailLike :: Located (Trail (V (QDiagram b V2 n Any)) (N (QDiagram b V2 n Any))) -> QDiagram b V2 n Any Source #