diagrams-core-1.1.0.3: Core libraries for diagrams EDSL

Maintainerdiagrams-discuss@googlegroups.com
Safe HaskellNone

Diagrams.Core.Juxtapose

Description

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

Synopsis

Documentation

class Juxtaposable a whereSource

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

Methods

juxtapose :: V a -> a -> a -> aSource

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.)

juxtaposeDefault :: (Enveloped a, HasOrigin a) => V a -> a -> a -> aSource

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