{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
module Diagrams.TwoD.Align
(
alignL, alignR, alignT, alignB
, alignTL, alignTR, alignBL, alignBR
, snugL, snugR, snugT, snugB
, alignX, snugX, alignY, snugY
, centerX, centerY, centerXY
, snugCenterX, snugCenterY, snugCenterXY
) where
import Diagrams.Core
import Diagrams.Align
import Diagrams.TwoD.Types
import Diagrams.TwoD.Vector
alignL :: (InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) => a -> a
alignL :: forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignL = forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, HasOrigin a) =>
v n -> a -> a
align forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unit_X
snugL :: (InSpace V2 n a, Fractional n, Alignable a, Traced a, HasOrigin a) => a -> a
snugL :: forall n a.
(InSpace V2 n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
a -> a
snugL = forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> a -> a
snug forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unit_X
alignR :: (InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) => a -> a
alignR :: forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignR = forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, HasOrigin a) =>
v n -> a -> a
align forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unitX
snugR :: (InSpace V2 n a, Fractional n, Alignable a, Traced a, HasOrigin a) => a -> a
snugR :: forall n a.
(InSpace V2 n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
a -> a
snugR = forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> a -> a
snug forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unitX
alignT :: (InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) => a -> a
alignT :: forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignT = forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, HasOrigin a) =>
v n -> a -> a
align forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unitY
snugT:: (InSpace V2 n a, Fractional n, Alignable a, Traced a, HasOrigin a) => a -> a
snugT :: forall n a.
(InSpace V2 n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
a -> a
snugT = forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> a -> a
snug forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unitY
alignB :: (InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) => a -> a
alignB :: forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignB = forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, HasOrigin a) =>
v n -> a -> a
align forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unit_Y
snugB :: (InSpace V2 n a, Fractional n, Alignable a, Traced a, HasOrigin a) => a -> a
snugB :: forall n a.
(InSpace V2 n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
a -> a
snugB = forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> a -> a
snug forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unit_Y
alignTL, alignTR, alignBL, alignBR :: (InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) => a -> a
alignTL :: forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignTL = forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignT forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignL
alignTR :: forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignTR = forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignT forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignR
alignBL :: forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignBL = forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignB forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignL
alignBR :: forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignBR = forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignB forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignR
alignX :: (InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a) => n -> a -> a
alignX :: forall (v :: * -> *) n a.
(InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a) =>
n -> a -> a
alignX = forall a (v :: * -> *) n.
(Alignable a, InSpace v n a, Fractional n, HasOrigin a) =>
v n -> n -> a -> a
alignBy forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unitX
snugX :: (InSpace v n a, R1 v, Fractional n, Alignable a, Traced a, HasOrigin a) => n -> a -> a
snugX :: forall (v :: * -> *) n a.
(InSpace v n a, R1 v, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
n -> a -> a
snugX = forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> n -> a -> a
snugBy forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unitX
alignY :: (InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) => n -> a -> a
alignY :: forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) =>
n -> a -> a
alignY = forall a (v :: * -> *) n.
(Alignable a, InSpace v n a, Fractional n, HasOrigin a) =>
v n -> n -> a -> a
alignBy forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unitY
snugY :: (InSpace v n a, R2 v, Fractional n, Alignable a, Traced a, HasOrigin a) => n -> a -> a
snugY :: forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
n -> a -> a
snugY = forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> n -> a -> a
snugBy forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unitY
centerX :: (InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a) => a -> a
centerX :: forall (v :: * -> *) n a.
(InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerX = forall a (v :: * -> *) n.
(Alignable a, InSpace v n a, Fractional n, HasOrigin a) =>
v n -> n -> a -> a
alignBy forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unitX n
0
snugCenterX :: (InSpace v n a, R1 v, Fractional n, Alignable a, Traced a, HasOrigin a) => a -> a
snugCenterX :: forall (v :: * -> *) n a.
(InSpace v n a, R1 v, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
a -> a
snugCenterX = forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> n -> a -> a
snugBy forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unitX n
0
centerY :: (InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) => a -> a
centerY :: forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerY = forall a (v :: * -> *) n.
(Alignable a, InSpace v n a, Fractional n, HasOrigin a) =>
v n -> n -> a -> a
alignBy forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unitY n
0
snugCenterY :: (InSpace v n a, R2 v, Fractional n, Alignable a, Traced a, HasOrigin a) => a -> a
snugCenterY :: forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
a -> a
snugCenterY = forall (v :: * -> *) n a.
(InSpace v n a, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
v n -> n -> a -> a
snugBy forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unitY n
0
centerXY :: (InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) => a -> a
centerXY :: forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerXY = forall (v :: * -> *) n a.
(InSpace v n a, R1 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerX forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, HasOrigin a) =>
a -> a
centerY
snugCenterXY :: (InSpace v n a, R2 v, Fractional n, Alignable a, Traced a, HasOrigin a) => a -> a
snugCenterXY :: forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
a -> a
snugCenterXY = forall (v :: * -> *) n a.
(InSpace v n a, R1 v, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
a -> a
snugCenterX forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall (v :: * -> *) n a.
(InSpace v n a, R2 v, Fractional n, Alignable a, Traced a,
HasOrigin a) =>
a -> a
snugCenterY