{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Diagrams.TwoD.Combinators
(
(===), (|||)
, hcat, hcat', hsep
, vcat, vcat', vsep
, strutR2
, strutX, strutY
, padX, padY
, extrudeLeft, extrudeRight, extrudeBottom, extrudeTop
, rectEnvelope, crop
, boundingRect, bg, bgFrame
) where
import Control.Lens ((&), (.~))
import Data.Colour
import Data.Default.Class
import Data.Semigroup
import Diagrams.Core
import Diagrams.Attributes (lwO)
import Diagrams.BoundingBox
import Diagrams.Combinators
import Diagrams.Path
import Diagrams.Query (value)
import Diagrams.Segment
import Diagrams.TrailLike
import Diagrams.TwoD.Align
import Diagrams.TwoD.Attributes (fc)
import Diagrams.TwoD.Path ()
import Diagrams.TwoD.Shapes
import Diagrams.TwoD.Transform (scaleX, scaleY)
import Diagrams.TwoD.Types
import Diagrams.TwoD.Vector
import Diagrams.Util (( # ))
import Linear.Affine
import Linear.Metric
import Linear.Vector
infixl 6 ===
infixl 6 |||
(===) :: (InSpace V2 n a, Juxtaposable a, Semigroup a) => a -> a -> a
=== :: forall n a.
(InSpace V2 n a, Juxtaposable a, Semigroup a) =>
a -> a -> a
(===) = Vn a -> a -> a -> a
forall a. (Juxtaposable a, Semigroup a) => Vn a -> a -> a -> a
beside Vn a
V2 n
forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unit_Y
(|||) :: (InSpace V2 n a, Juxtaposable a, Semigroup a) => a -> a -> a
||| :: forall n a.
(InSpace V2 n a, Juxtaposable a, Semigroup a) =>
a -> a -> a
(|||) = Vn a -> a -> a -> a
forall a. (Juxtaposable a, Semigroup a) => Vn a -> a -> a -> a
beside Vn a
V2 n
forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unitX
hcat :: (InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a, Monoid' a)
=> [a] -> a
hcat :: forall n a.
(InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a,
Monoid' a) =>
[a] -> a
hcat = CatOpts n -> [a] -> a
forall n a.
(InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a,
Monoid' a) =>
CatOpts n -> [a] -> a
hcat' CatOpts n
forall a. Default a => a
def
hcat' :: (InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a, Monoid' a)
=> CatOpts n -> [a] -> a
hcat' :: forall n a.
(InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a,
Monoid' a) =>
CatOpts n -> [a] -> a
hcat' = V2 n -> CatOpts n -> [a] -> a
forall (v :: * -> *) n a.
(InSpace v n a, Metric v, Floating n, Juxtaposable a, Monoid' a,
HasOrigin a) =>
v n -> CatOpts n -> [a] -> a
cat' V2 n
forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unitX
hsep :: (InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a, Monoid' a)
=> n -> [a] -> a
hsep :: forall n a.
(InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a,
Monoid' a) =>
n -> [a] -> a
hsep n
s = CatOpts n -> [a] -> a
forall n a.
(InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a,
Monoid' a) =>
CatOpts n -> [a] -> a
hcat' (CatOpts n
forall a. Default a => a
def CatOpts n -> (CatOpts n -> CatOpts n) -> CatOpts n
forall a b. a -> (a -> b) -> b
& (n -> Identity n) -> CatOpts n -> Identity (CatOpts n)
forall n (f :: * -> *).
Functor f =>
(n -> f n) -> CatOpts n -> f (CatOpts n)
sep ((n -> Identity n) -> CatOpts n -> Identity (CatOpts n))
-> n -> CatOpts n -> CatOpts n
forall s t a b. ASetter s t a b -> b -> s -> t
.~ n
s)
vcat :: (InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a, Monoid' a)
=> [a] -> a
vcat :: forall n a.
(InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a,
Monoid' a) =>
[a] -> a
vcat = CatOpts n -> [a] -> a
forall n a.
(InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a,
Monoid' a) =>
CatOpts n -> [a] -> a
vcat' CatOpts n
forall a. Default a => a
def
vcat' :: (InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a, Monoid' a)
=> CatOpts n -> [a] -> a
vcat' :: forall n a.
(InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a,
Monoid' a) =>
CatOpts n -> [a] -> a
vcat' = V2 n -> CatOpts n -> [a] -> a
forall (v :: * -> *) n a.
(InSpace v n a, Metric v, Floating n, Juxtaposable a, Monoid' a,
HasOrigin a) =>
v n -> CatOpts n -> [a] -> a
cat' V2 n
forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unit_Y
vsep :: (InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a, Monoid' a)
=> n -> [a] -> a
vsep :: forall n a.
(InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a,
Monoid' a) =>
n -> [a] -> a
vsep n
s = CatOpts n -> [a] -> a
forall n a.
(InSpace V2 n a, Floating n, Juxtaposable a, HasOrigin a,
Monoid' a) =>
CatOpts n -> [a] -> a
vcat' (CatOpts n
forall a. Default a => a
def CatOpts n -> (CatOpts n -> CatOpts n) -> CatOpts n
forall a b. a -> (a -> b) -> b
& (n -> Identity n) -> CatOpts n -> Identity (CatOpts n)
forall n (f :: * -> *).
Functor f =>
(n -> f n) -> CatOpts n -> f (CatOpts n)
sep ((n -> Identity n) -> CatOpts n -> Identity (CatOpts n))
-> n -> CatOpts n -> CatOpts n
forall s t a b. ASetter s t a b -> b -> s -> t
.~ n
s)
strutR2 :: (RealFloat n, Monoid' m) => V2 n -> QDiagram b V2 n m
strutR2 :: forall n m b. (RealFloat n, Monoid' m) => V2 n -> QDiagram b V2 n m
strutR2 V2 n
v = FixedSegment V2 n -> QDiagram b V2 n m
forall (v :: * -> *) n a m b.
(InSpace v n a, Monoid' m, Enveloped a, Traced a) =>
a -> QDiagram b v n m
phantom FixedSegment V2 n
seg
where
seg :: FixedSegment V2 n
seg = Point V2 n -> Point V2 n -> FixedSegment V2 n
forall (v :: * -> *) n. Point v n -> Point v n -> FixedSegment v n
FLinear (Point V2 n
forall (f :: * -> *) a. (Additive f, Num a) => Point f a
origin Point V2 n -> Diff (Point V2) n -> Point V2 n
forall a. Num a => Point V2 a -> Diff (Point V2) a -> Point V2 a
forall (p :: * -> *) a. (Affine p, Num a) => p a -> Diff p a -> p a
.+^ n
0.5 n -> V2 n -> V2 n
forall (f :: * -> *) a. (Functor f, Num a) => a -> f a -> f a
*^ V2 n
v) (Point V2 n
forall (f :: * -> *) a. (Additive f, Num a) => Point f a
origin Point V2 n -> Diff (Point V2) n -> Point V2 n
forall a. Num a => Point V2 a -> Diff (Point V2) a -> Point V2 a
forall (p :: * -> *) a. (Affine p, Num a) => p a -> Diff p a -> p a
.+^ (-n
0.5) n -> V2 n -> V2 n
forall (f :: * -> *) a. (Functor f, Num a) => a -> f a -> f a
*^ V2 n
v)
strutX :: (Metric v, R1 v, OrderedField n) => n -> QDiagram b v n m
strutX :: forall (v :: * -> *) n b m.
(Metric v, R1 v, OrderedField n) =>
n -> QDiagram b v n m
strutX n
d = v n -> QDiagram b v n m
forall (v :: * -> *) n b m.
(Metric v, OrderedField n) =>
v n -> QDiagram b v n m
strut (v n
forall a. Num a => v a
forall (f :: * -> *) a. (Additive f, Num a) => f a
zero v n -> (v n -> v n) -> v n
forall a b. a -> (a -> b) -> b
& (n -> Identity n) -> v n -> Identity (v n)
forall a. Lens' (v a) a
forall (t :: * -> *) a. R1 t => Lens' (t a) a
_x ((n -> Identity n) -> v n -> Identity (v n)) -> n -> v n -> v n
forall s t a b. ASetter s t a b -> b -> s -> t
.~ n
d)
strutY :: (Metric v, R2 v, OrderedField n) => n -> QDiagram b v n m
strutY :: forall (v :: * -> *) n b m.
(Metric v, R2 v, OrderedField n) =>
n -> QDiagram b v n m
strutY n
d = v n -> QDiagram b v n m
forall (v :: * -> *) n b m.
(Metric v, OrderedField n) =>
v n -> QDiagram b v n m
strut (v n
forall a. Num a => v a
forall (f :: * -> *) a. (Additive f, Num a) => f a
zero v n -> (v n -> v n) -> v n
forall a b. a -> (a -> b) -> b
& (n -> Identity n) -> v n -> Identity (v n)
forall a. Lens' (v a) a
forall (t :: * -> *) a. R2 t => Lens' (t a) a
_y ((n -> Identity n) -> v n -> Identity (v n)) -> n -> v n -> v n
forall s t a b. ASetter s t a b -> b -> s -> t
.~ n
d)
padX :: (Metric v, R2 v, OrderedField n, Monoid' m)
=> n -> QDiagram b v n m -> QDiagram b v n m
padX :: forall (v :: * -> *) n m b.
(Metric v, R2 v, OrderedField n, Monoid' m) =>
n -> QDiagram b v n m -> QDiagram b v n m
padX n
s QDiagram b v n m
d = QDiagram b v n m -> QDiagram b v n m -> QDiagram b v n m
forall (v :: * -> *) n a m b.
(InSpace v n a, Monoid' m, Enveloped a) =>
a -> QDiagram b v n m -> QDiagram b v n m
withEnvelope (QDiagram b v n m
d QDiagram b v n m
-> (QDiagram b v n m -> QDiagram b v n m) -> QDiagram b v n m
forall a b. a -> (a -> b) -> b
# n -> QDiagram b v n m -> QDiagram b v n m
forall (v :: * -> *) n t.
(InSpace v n t, R2 v, Fractional n, Transformable t) =>
n -> t -> t
scaleX n
s) QDiagram b v n m
d
padY :: (Metric v, R2 v, Monoid' m, OrderedField n)
=> n -> QDiagram b v n m -> QDiagram b v n m
padY :: forall (v :: * -> *) m n b.
(Metric v, R2 v, Monoid' m, OrderedField n) =>
n -> QDiagram b v n m -> QDiagram b v n m
padY n
s QDiagram b v n m
d = QDiagram b v n m -> QDiagram b v n m -> QDiagram b v n m
forall (v :: * -> *) n a m b.
(InSpace v n a, Monoid' m, Enveloped a) =>
a -> QDiagram b v n m -> QDiagram b v n m
withEnvelope (QDiagram b v n m
d QDiagram b v n m
-> (QDiagram b v n m -> QDiagram b v n m) -> QDiagram b v n m
forall a b. a -> (a -> b) -> b
# n -> QDiagram b v n m -> QDiagram b v n m
forall (v :: * -> *) n t.
(InSpace v n t, R2 v, Fractional n, Transformable t) =>
n -> t -> t
scaleY n
s) QDiagram b v n m
d
extrudeLeft :: (OrderedField n, Monoid' m) => n -> QDiagram b V2 n m -> QDiagram b V2 n m
extrudeLeft :: forall n m b.
(OrderedField n, Monoid' m) =>
n -> QDiagram b V2 n m -> QDiagram b V2 n m
extrudeLeft n
s
| n
s n -> n -> Bool
forall a. Ord a => a -> a -> Bool
>= n
0 = V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall (v :: * -> *) n m b.
(Metric v, OrderedField n, Monoid' m) =>
v n -> QDiagram b v n m -> QDiagram b v n m
extrudeEnvelope (V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m)
-> V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall a b. (a -> b) -> a -> b
$ V2 n
forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unitX V2 n -> n -> V2 n
forall (f :: * -> *) a. (Functor f, Num a) => f a -> a -> f a
^* n -> n
forall a. Num a => a -> a
negate n
s
| Bool
otherwise = V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall (v :: * -> *) n m b.
(Metric v, OrderedField n, Monoid' m) =>
v n -> QDiagram b v n m -> QDiagram b v n m
intrudeEnvelope (V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m)
-> V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall a b. (a -> b) -> a -> b
$ V2 n
forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unitX V2 n -> n -> V2 n
forall (f :: * -> *) a. (Functor f, Num a) => f a -> a -> f a
^* n -> n
forall a. Num a => a -> a
negate n
s
extrudeRight :: (OrderedField n, Monoid' m) => n -> QDiagram b V2 n m -> QDiagram b V2 n m
extrudeRight :: forall n m b.
(OrderedField n, Monoid' m) =>
n -> QDiagram b V2 n m -> QDiagram b V2 n m
extrudeRight n
s
| n
s n -> n -> Bool
forall a. Ord a => a -> a -> Bool
>= n
0 = V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall (v :: * -> *) n m b.
(Metric v, OrderedField n, Monoid' m) =>
v n -> QDiagram b v n m -> QDiagram b v n m
extrudeEnvelope (V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m)
-> V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall a b. (a -> b) -> a -> b
$ V2 n
forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unitX V2 n -> n -> V2 n
forall (f :: * -> *) a. (Functor f, Num a) => f a -> a -> f a
^* n
s
| Bool
otherwise = V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall (v :: * -> *) n m b.
(Metric v, OrderedField n, Monoid' m) =>
v n -> QDiagram b v n m -> QDiagram b v n m
intrudeEnvelope (V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m)
-> V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall a b. (a -> b) -> a -> b
$ V2 n
forall (v :: * -> *) n. (R1 v, Additive v, Num n) => v n
unitX V2 n -> n -> V2 n
forall (f :: * -> *) a. (Functor f, Num a) => f a -> a -> f a
^* n
s
extrudeBottom :: (OrderedField n, Monoid' m) => n -> QDiagram b V2 n m -> QDiagram b V2 n m
extrudeBottom :: forall n m b.
(OrderedField n, Monoid' m) =>
n -> QDiagram b V2 n m -> QDiagram b V2 n m
extrudeBottom n
s
| n
s n -> n -> Bool
forall a. Ord a => a -> a -> Bool
>= n
0 = V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall (v :: * -> *) n m b.
(Metric v, OrderedField n, Monoid' m) =>
v n -> QDiagram b v n m -> QDiagram b v n m
extrudeEnvelope (V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m)
-> V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall a b. (a -> b) -> a -> b
$ V2 n
forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unitY V2 n -> n -> V2 n
forall (f :: * -> *) a. (Functor f, Num a) => f a -> a -> f a
^* n -> n
forall a. Num a => a -> a
negate n
s
| Bool
otherwise = V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall (v :: * -> *) n m b.
(Metric v, OrderedField n, Monoid' m) =>
v n -> QDiagram b v n m -> QDiagram b v n m
intrudeEnvelope (V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m)
-> V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall a b. (a -> b) -> a -> b
$ V2 n
forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unitY V2 n -> n -> V2 n
forall (f :: * -> *) a. (Functor f, Num a) => f a -> a -> f a
^* n -> n
forall a. Num a => a -> a
negate n
s
extrudeTop :: (OrderedField n, Monoid' m) => n -> QDiagram b V2 n m -> QDiagram b V2 n m
extrudeTop :: forall n m b.
(OrderedField n, Monoid' m) =>
n -> QDiagram b V2 n m -> QDiagram b V2 n m
extrudeTop n
s
| n
s n -> n -> Bool
forall a. Ord a => a -> a -> Bool
>= n
0 = V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall (v :: * -> *) n m b.
(Metric v, OrderedField n, Monoid' m) =>
v n -> QDiagram b v n m -> QDiagram b v n m
extrudeEnvelope (V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m)
-> V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall a b. (a -> b) -> a -> b
$ V2 n
forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unitY V2 n -> n -> V2 n
forall (f :: * -> *) a. (Functor f, Num a) => f a -> a -> f a
^* n
s
| Bool
otherwise = V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall (v :: * -> *) n m b.
(Metric v, OrderedField n, Monoid' m) =>
v n -> QDiagram b v n m -> QDiagram b v n m
intrudeEnvelope (V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m)
-> V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall a b. (a -> b) -> a -> b
$ V2 n
forall (v :: * -> *) n. (R2 v, Additive v, Num n) => v n
unitY V2 n -> n -> V2 n
forall (f :: * -> *) a. (Functor f, Num a) => f a -> a -> f a
^* n
s
rectEnvelope :: forall b n m. (OrderedField n, Monoid' m)
=> Point V2 n -> V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
rectEnvelope :: forall b n m.
(OrderedField n, Monoid' m) =>
Point V2 n -> V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
rectEnvelope Point V2 n
p (V2 n
w n
h) = Path V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall (v :: * -> *) n a m b.
(InSpace v n a, Monoid' m, Enveloped a) =>
a -> QDiagram b v n m -> QDiagram b v n m
withEnvelope (n -> n -> Path V2 n
forall n t. (InSpace V2 n t, TrailLike t) => n -> n -> t
rect n
w n
h Path V2 n -> (Path V2 n -> Path V2 n) -> Path V2 n
forall a b. a -> (a -> b) -> b
# Path V2 n -> Path V2 n
forall n a.
(InSpace V2 n a, Fractional n, Alignable a, HasOrigin a) =>
a -> a
alignBL Path V2 n -> (Path V2 n -> Path V2 n) -> Path V2 n
forall a b. a -> (a -> b) -> b
# Point V2 n -> Path V2 n -> Path V2 n
forall (v :: * -> *) n t.
(InSpace v n t, HasOrigin t) =>
Point v n -> t -> t
moveTo Point V2 n
p :: Path V2 n)
crop :: forall b n m. (OrderedField n, Monoid' m)
=> Point V2 n -> V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
crop :: forall b n m.
(OrderedField n, Monoid' m) =>
Point V2 n -> V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
crop = Point V2 n -> V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
forall b n m.
(OrderedField n, Monoid' m) =>
Point V2 n -> V2 n -> QDiagram b V2 n m -> QDiagram b V2 n m
rectEnvelope
boundingRect :: ( InSpace V2 n a, SameSpace a t
, Enveloped t, Transformable t, TrailLike t, Monoid t
, Enveloped a)
=> a -> t
boundingRect :: forall n a t.
(InSpace V2 n a, SameSpace a t, Enveloped t, Transformable t,
TrailLike t, Monoid t, Enveloped a) =>
a -> t
boundingRect = (BoundingBox V2 n -> t -> t
forall (v :: * -> *) n a.
(InSpace v n a, HasBasis v, Enveloped a, Transformable a,
Monoid a) =>
BoundingBox v n -> a -> a
`boxFit` n -> n -> t
forall n t. (InSpace V2 n t, TrailLike t) => n -> n -> t
rect n
1 n
1) (BoundingBox V2 n -> t) -> (a -> BoundingBox V2 n) -> a -> t
forall b c a. (b -> c) -> (a -> b) -> a -> c
. a -> BoundingBox V2 n
forall (v :: * -> *) n a.
(InSpace v n a, HasBasis v, Enveloped a) =>
a -> BoundingBox v n
boundingBox
bg :: (TypeableFloat n, Renderable (Path V2 n) b, Monoid' q)
=> Colour Double -> QDiagram b V2 n q -> QDiagram b V2 n q
bg :: forall n b q.
(TypeableFloat n, Renderable (Path V2 n) b, Monoid' q) =>
Colour Double -> QDiagram b V2 n q -> QDiagram b V2 n q
bg Colour Double
c QDiagram b V2 n q
d = QDiagram b V2 n q
d QDiagram b V2 n q -> QDiagram b V2 n q -> QDiagram b V2 n q
forall a. Semigroup a => a -> a -> a
<> QDiagram b V2 n q -> QDiagram b V2 n Any
forall n a t.
(InSpace V2 n a, SameSpace a t, Enveloped t, Transformable t,
TrailLike t, Monoid t, Enveloped a) =>
a -> t
boundingRect QDiagram b V2 n q
d QDiagram b V2 n Any
-> (QDiagram b V2 n Any -> QDiagram b V2 n Any)
-> QDiagram b V2 n Any
forall a b. a -> (a -> b) -> b
# n -> QDiagram b V2 n Any -> QDiagram b V2 n Any
forall a n. (N a ~ n, HasStyle a, Typeable n) => n -> a -> a
lwO n
0 QDiagram b V2 n Any
-> (QDiagram b V2 n Any -> QDiagram b V2 n Any)
-> QDiagram b V2 n Any
forall a b. a -> (a -> b) -> b
# Colour Double -> QDiagram b V2 n Any -> QDiagram b V2 n Any
forall n a.
(InSpace V2 n a, Floating n, Typeable n, HasStyle a) =>
Colour Double -> a -> a
fc Colour Double
c QDiagram b V2 n Any
-> (QDiagram b V2 n Any -> QDiagram b V2 n q) -> QDiagram b V2 n q
forall a b. a -> (a -> b) -> b
# q -> QDiagram b V2 n Any -> QDiagram b V2 n q
forall m b (v :: * -> *) n.
Monoid m =>
m -> QDiagram b v n Any -> QDiagram b v n m
value q
forall a. Monoid a => a
mempty
bgFrame :: (TypeableFloat n, Renderable (Path V2 n) b, Monoid' q)
=> n -> Colour Double -> QDiagram b V2 n q -> QDiagram b V2 n q
bgFrame :: forall n b q.
(TypeableFloat n, Renderable (Path V2 n) b, Monoid' q) =>
n -> Colour Double -> QDiagram b V2 n q -> QDiagram b V2 n q
bgFrame n
f Colour Double
c QDiagram b V2 n q
d = QDiagram b V2 n q
d QDiagram b V2 n q -> QDiagram b V2 n q -> QDiagram b V2 n q
forall a. Semigroup a => a -> a -> a
<> QDiagram b V2 n q -> QDiagram b V2 n Any
forall n a t.
(InSpace V2 n a, SameSpace a t, Enveloped t, Transformable t,
TrailLike t, Monoid t, Enveloped a) =>
a -> t
boundingRect (n -> QDiagram b V2 n q -> QDiagram b V2 n q
forall (v :: * -> *) n m b.
(Metric v, OrderedField n, Monoid' m) =>
n -> QDiagram b v n m -> QDiagram b v n m
frame n
f QDiagram b V2 n q
d) QDiagram b V2 n Any
-> (QDiagram b V2 n Any -> QDiagram b V2 n Any)
-> QDiagram b V2 n Any
forall a b. a -> (a -> b) -> b
# n -> QDiagram b V2 n Any -> QDiagram b V2 n Any
forall a n. (N a ~ n, HasStyle a, Typeable n) => n -> a -> a
lwO n
0 QDiagram b V2 n Any
-> (QDiagram b V2 n Any -> QDiagram b V2 n Any)
-> QDiagram b V2 n Any
forall a b. a -> (a -> b) -> b
# Colour Double -> QDiagram b V2 n Any -> QDiagram b V2 n Any
forall n a.
(InSpace V2 n a, Floating n, Typeable n, HasStyle a) =>
Colour Double -> a -> a
fc Colour Double
c QDiagram b V2 n Any
-> (QDiagram b V2 n Any -> QDiagram b V2 n q) -> QDiagram b V2 n q
forall a b. a -> (a -> b) -> b
# q -> QDiagram b V2 n Any -> QDiagram b V2 n q
forall m b (v :: * -> *) n.
Monoid m =>
m -> QDiagram b v n Any -> QDiagram b v n m
value q
forall a. Monoid a => a
mempty