-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathConfiguration.hs
48 lines (39 loc) · 1.12 KB
/
Configuration.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
module Configuration where
-- polynomial-roots
import Rendering.Colour
( AlphaColour )
import Rendering.Coord
( Cd2 )
--------------------------------------------------------------------------------
data WindowSpec
= WindowSpec
{ center :: Cd2 Double
, size :: Cd2 Double
}
deriving stock ( Eq, Ord, Read, Show )
data AspectCorrection = None | Clip | Expand
deriving stock ( Eq, Ord, Read, Show, Enum, Bounded )
data BlendFunction = Blend | Overlay
deriving stock ( Eq, Ord, Read, Show, Enum, Bounded )
data GradientSpec
= NamedGradient (String, Maybe Double)
| Split [(GradientSpec, Double)]
| Combine BlendFunction [GradientSpec]
| Collate [(AlphaColour Double, Double)]
deriving stock ( Eq, Read, Show )
data RenderSpec
= RenderSpec
{ windowSpec :: WindowSpec
, outputFile :: Maybe String
, outputSize :: Cd2 Int
, fixAspect :: AspectCorrection
}
deriving stock ( Eq, Read, Show )
data RunMode = ImageFile | WithGUI
deriving stock ( Eq, Ord, Read, Show, Enum, Bounded )
data RunSpec
= RunSpec
{ runMode :: RunMode
, render :: RenderSpec
}
deriving stock ( Eq, Read, Show )