diagrams-core-1.4.1.1: Core libraries for diagrams EDSL

Diagrams.Core.Measure

Synopsis

# Documentation

newtype Measured n a #

'Measured n a' is an object that depends on local, normalized and global scales. The normalized and global scales are calculated when rendering a diagram.

For attributes, the local scale gets multiplied by the average scale of the transform.

Constructors

 Measured Fieldsunmeasure :: (n, n, n) -> a
Instances
 # Instance detailsDefined in Diagrams.Core.Measure Methodsdimap :: (a -> b) -> (c -> d) -> Measured b c -> Measured a d #lmap :: (a -> b) -> Measured b c -> Measured a c #rmap :: (b -> c) -> Measured a b -> Measured a c #(#.) :: Coercible c b => q b c -> Measured a b -> Measured a c #(.#) :: Coercible b a => Measured b c -> q a b -> Measured a c # # Instance detailsDefined in Diagrams.Core.Measure Methods(>>=) :: Measured n a -> (a -> Measured n b) -> Measured n b #(>>) :: Measured n a -> Measured n b -> Measured n b #return :: a -> Measured n a #fail :: String -> Measured n a # # Instance detailsDefined in Diagrams.Core.Measure Methodsfmap :: (a -> b) -> Measured n a -> Measured n b #(<\$) :: a -> Measured n b -> Measured n a # # Instance detailsDefined in Diagrams.Core.Measure Methodspure :: a -> Measured n a #(<*>) :: Measured n (a -> b) -> Measured n a -> Measured n b #liftA2 :: (a -> b -> c) -> Measured n a -> Measured n b -> Measured n c #(*>) :: Measured n a -> Measured n b -> Measured n b #(<*) :: Measured n a -> Measured n b -> Measured n a # # Instance detailsDefined in Diagrams.Core.Measure Methodsdistribute :: Functor f => f (Measured n a) -> Measured n (f a) #collect :: Functor f => (a -> Measured n b) -> f a -> Measured n (f b) #distributeM :: Monad m => m (Measured n a) -> Measured n (m a) #collectM :: Monad m => (a -> Measured n b) -> m a -> Measured n (m b) # # Instance detailsDefined in Diagrams.Core.Measure Associated Typestype Rep (Measured n) :: Type # Methodstabulate :: (Rep (Measured n) -> a) -> Measured n a #index :: Measured n a -> Rep (Measured n) -> a # # Instance detailsDefined in Diagrams.Core.Measure Methodszero :: Num a => Measured n a #(^+^) :: Num a => Measured n a -> Measured n a -> Measured n a #(^-^) :: Num a => Measured n a -> Measured n a -> Measured n a #lerp :: Num a => a -> Measured n a -> Measured n a -> Measured n a #liftU2 :: (a -> a -> a) -> Measured n a -> Measured n a -> Measured n a #liftI2 :: (a -> b -> c) -> Measured n a -> Measured n b -> Measured n c # Floating a => Floating (Measured n a) # Instance detailsDefined in Diagrams.Core.Measure Methodspi :: Measured n a #exp :: Measured n a -> Measured n a #log :: Measured n a -> Measured n a #sqrt :: Measured n a -> Measured n a #(**) :: Measured n a -> Measured n a -> Measured n a #logBase :: Measured n a -> Measured n a -> Measured n a #sin :: Measured n a -> Measured n a #cos :: Measured n a -> Measured n a #tan :: Measured n a -> Measured n a #asin :: Measured n a -> Measured n a #acos :: Measured n a -> Measured n a #atan :: Measured n a -> Measured n a #sinh :: Measured n a -> Measured n a #cosh :: Measured n a -> Measured n a #tanh :: Measured n a -> Measured n a #asinh :: Measured n a -> Measured n a #acosh :: Measured n a -> Measured n a #atanh :: Measured n a -> Measured n a #log1p :: Measured n a -> Measured n a #expm1 :: Measured n a -> Measured n a #log1pexp :: Measured n a -> Measured n a #log1mexp :: Measured n a -> Measured n a # Fractional a => Fractional (Measured n a) # Instance detailsDefined in Diagrams.Core.Measure Methods(/) :: Measured n a -> Measured n a -> Measured n a #recip :: Measured n a -> Measured n a # Num a => Num (Measured n a) # Instance detailsDefined in Diagrams.Core.Measure Methods(+) :: Measured n a -> Measured n a -> Measured n a #(-) :: Measured n a -> Measured n a -> Measured n a #(*) :: Measured n a -> Measured n a -> Measured n a #negate :: Measured n a -> Measured n a #abs :: Measured n a -> Measured n a #signum :: Measured n a -> Measured n a #fromInteger :: Integer -> Measured n a # Semigroup a => Semigroup (Measured n a) # Instance detailsDefined in Diagrams.Core.Measure Methods(<>) :: Measured n a -> Measured n a -> Measured n a #sconcat :: NonEmpty (Measured n a) -> Measured n a #stimes :: Integral b => b -> Measured n a -> Measured n a # Monoid a => Monoid (Measured n a) # Instance detailsDefined in Diagrams.Core.Measure Methodsmempty :: Measured n a #mappend :: Measured n a -> Measured n a -> Measured n a #mconcat :: [Measured n a] -> Measured n a # HasOrigin t => HasOrigin (Measured n t) # Instance detailsDefined in Diagrams.Core.HasOrigin MethodsmoveOriginTo :: Point (V (Measured n t)) (N (Measured n t)) -> Measured n t -> Measured n t # (InSpace v n t, Transformable t, HasLinearMap v, Floating n) => Transformable (Measured n t) # Instance detailsDefined in Diagrams.Core.Transform Methodstransform :: Transformation (V (Measured n t)) (N (Measured n t)) -> Measured n t -> Measured n t # HasStyle b => HasStyle (Measured n b) # Instance detailsDefined in Diagrams.Core.Style MethodsapplyStyle :: Style (V (Measured n b)) (N (Measured n b)) -> Measured n b -> Measured n b # Qualifiable a => Qualifiable (Measured n a) # Instance detailsDefined in Diagrams.Core.Names Methods(.>>) :: IsName a0 => a0 -> Measured n a -> Measured n a # Juxtaposable a => Juxtaposable (Measured n a) # Instance detailsDefined in Diagrams.Core.Juxtapose Methodsjuxtapose :: Vn (Measured n a) -> Measured n a -> Measured n a -> Measured n a # MonadReader (n, n, n) (Measured n) # Instance detailsDefined in Diagrams.Core.Measure Methodsask :: Measured n (n, n, n) #local :: ((n, n, n) -> (n, n, n)) -> Measured n a -> Measured n a #reader :: ((n, n, n) -> a) -> Measured n a # type Rep (Measured n) # Instance detailsDefined in Diagrams.Core.Measure type Rep (Measured n) = (n, n, n) type N (Measured n a) # Instance detailsDefined in Diagrams.Core.Measure type N (Measured n a) = N a type V (Measured n a) # Instance detailsDefined in Diagrams.Core.Measure type V (Measured n a) = V a

type Measure n = Measured n n #

A measure is a Measured number.

fromMeasured :: Num n => n -> n -> Measured n a -> a #

fromMeasured globalScale normalizedScale measure -> a

output :: n -> Measure n #

Output units don't change.

local :: Num n => n -> Measure n #

Local units are scaled by the average scale of a transform.

global :: Num n => n -> Measure n #

Global units are scaled so that they are interpreted relative to the size of the final rendered diagram.

normalized :: Num n => n -> Measure n #

Normalized units get scaled so that one normalized unit is the size of the final diagram.

normalised :: Num n => n -> Measure n #

Just like normalized but spelt properly.

scaleLocal :: Num n => n -> Measured n a -> Measured n a #

Scale the local units of a Measured thing.

atLeast :: Ord n => Measure n -> Measure n -> Measure n #

Calculate the smaller of two measures.

atMost :: Ord n => Measure n -> Measure n -> Measure n #

Calculate the larger of two measures.