diagrams-core-1.5.1.1: Core libraries for diagrams EDSL

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

Diagrams.Core.Juxtapose

Description

Things which can be placed "next to" other things, for some appropriate notion of "next to".

Synopsis

- class Juxtaposable a where
  - juxtapose :: Vn a -> a -> a -> a
- juxtaposeDefault :: (Enveloped a, HasOrigin a) => Vn a -> a -> a -> a

# Documentation

class Juxtaposable a where Source #

Class of things which can be placed "next to" other things, for some appropriate notion of "next to".

Methods

juxtapose :: Vn a -> a -> a -> a Source #

`juxtapose v a1 a2` positions `a2` next to `a1` in the direction of `v`. In particular, place `a2` so that `v` points from the local origin of `a1` towards the old local origin of `a2`; `a1`'s local origin becomes `a2`'s new local origin. The result is just a translated version of `a2`. (In particular, this operation does not combine `a1` and `a2` in any way.)

#### Instances

Instances details

(Enveloped b, HasOrigin b, Ord b) => Juxtaposable (Set b) Source # |
Instance details Defined in Diagrams.Core.Juxtapose Methods juxtapose :: Vn (Set b) -> Set b -> Set b -> Set b Source #
(Enveloped b, HasOrigin b) => Juxtaposable [b] Source # |
Instance details Defined in Diagrams.Core.Juxtapose Methods juxtapose :: Vn [b] -> [b] -> [b] -> [b] Source #
(Enveloped b, HasOrigin b) => Juxtaposable (Map k b) Source # |
Instance details Defined in Diagrams.Core.Juxtapose Methods juxtapose :: Vn (Map k b) -> Map k b -> Map k b -> Map k b Source #
(Metric v, OrderedField n) => Juxtaposable (Envelope v n) Source # |
Instance details Defined in Diagrams.Core.Juxtapose Methods juxtapose :: Vn (Envelope v n) -> Envelope v n -> Envelope v n -> Envelope v n Source #
Juxtaposable a => Juxtaposable (Measured n a) Source # |
Instance details Defined in Diagrams.Core.Juxtapose Methods juxtapose :: Vn (Measured n a) -> Measured n a -> Measured n a -> Measured n a Source #
(Enveloped a, HasOrigin a, Enveloped b, HasOrigin b, V a ~ V b, N a ~ N b) => Juxtaposable (a, b) Source # |
Instance details Defined in Diagrams.Core.Juxtapose Methods juxtapose :: Vn (a, b) -> (a, b) -> (a, b) -> (a, b) Source #
Juxtaposable a => Juxtaposable (b -> a) Source # |
Instance details Defined in Diagrams.Core.Juxtapose Methods juxtapose :: Vn (b -> a) -> (b -> a) -> (b -> a) -> b -> a Source #
(Metric v, OrderedField n, Monoid' m) => Juxtaposable (QDiagram b v n m) Source # |
Instance details Defined in Diagrams.Core.Types Methods juxtapose :: Vn (QDiagram b v n m) -> QDiagram b v n m -> QDiagram b v n m -> QDiagram b v n m Source #

juxtaposeDefault :: (Enveloped a, HasOrigin a) => Vn a -> a -> a -> a Source #

Default implementation of `juxtapose` for things which are instances of `Enveloped` and `HasOrigin`. If either envelope is empty, the second object is returned unchanged.