Mercurial > projects > doodle
annotate doodle/tk/color.d @ 76:78bc2046256e
And some more
author | "David Bryant <bagnose@gmail.com>" |
---|---|
date | Sun, 15 Aug 2010 01:21:14 +0930 |
parents | |
children | 535bae7a7305 |
rev | line source |
---|---|
76 | 1 module doodle.tk.color; |
2 | |
3 struct Color { | |
4 static immutable Color DEFAULT = Color(0.0, 0.0, 0.0, 1.0); | |
5 | |
6 this(in double r, in double g, in double b, in double a) { | |
7 // XXX how to deal with out of range? Clamp/assert | |
8 _r = r; | |
9 _g = g; | |
10 _b = b; | |
11 _a = a; | |
12 } | |
13 | |
14 // TODO | |
15 // hsv, grey, etc. | |
16 | |
17 private { | |
18 double _r, _g, _b, _a; | |
19 } | |
20 } |