diagrams-core-1.4.0.1: Core libraries for diagrams EDSL

Safe HaskellNone
LanguageHaskell2010

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 

Fields

Instances

Profunctor Measured # 

Methods

dimap :: (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 => (b -> c) -> Measured a b -> Measured a c #

(.#) :: Coercible * b a => Measured b c -> (a -> b) -> Measured a c #

Monad (Measured n) # 

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 #

Functor (Measured n) # 

Methods

fmap :: (a -> b) -> Measured n a -> Measured n b #

(<$) :: a -> Measured n b -> Measured n a #

Applicative (Measured n) # 

Methods

pure :: a -> Measured n a #

(<*>) :: Measured n (a -> b) -> Measured n a -> Measured n b #

(*>) :: Measured n a -> Measured n b -> Measured n b #

(<*) :: Measured n a -> Measured n b -> Measured n a #

Distributive (Measured n) # 

Methods

distribute :: 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) #

Representable (Measured n) # 

Associated Types

type Rep (Measured n :: * -> *) :: * #

Methods

tabulate :: (Rep (Measured n) -> a) -> Measured n a #

index :: Measured n a -> Rep (Measured n) -> a #

Additive (Measured n) # 

Methods

zero :: 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) # 

Methods

pi :: 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) # 

Methods

(/) :: Measured n a -> Measured n a -> Measured n a #

recip :: Measured n a -> Measured n a #

fromRational :: Rational -> Measured n a #

Num a => Num (Measured n a) # 

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

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

Methods

mempty :: 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) # 

Methods

moveOriginTo :: 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) # 

Methods

transform :: Transformation (V (Measured n t)) (N (Measured n t)) -> Measured n t -> Measured n t #

Qualifiable a => Qualifiable (Measured n a) # 

Methods

(.>>) :: IsName a => a -> Measured n a -> Measured n a #

HasStyle b => HasStyle (Measured n b) # 

Methods

applyStyle :: Style (V (Measured n b)) (N (Measured n b)) -> Measured n b -> Measured n b #

Juxtaposable a => Juxtaposable (Measured n a) # 

Methods

juxtapose :: Vn (Measured n a) -> Measured n a -> Measured n a -> Measured n a #

MonadReader (n, n, n) (Measured n) # 

Methods

ask :: 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) # 
type Rep (Measured n) = (n, n, n)
type N (Measured n a) # 
type N (Measured n a) = N a
type V (Measured n a) # 
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.