Mercurial > projects > doodle
view doodle/tk/color.d @ 91:42766e14534e
Update screenViewBounds when the window is resized
author | daveb |
---|---|
date | Thu, 19 Aug 2010 18:28:18 +0930 |
parents | 535bae7a7305 |
children | 523269b36711 |
line wrap: on
line source
module doodle.tk.color; struct Color { static immutable Color DEFAULT = Color(0.0, 0.0, 0.0, 1.0); this(in double r, in double g, in double b, in double a) { // XXX how to deal with out of range? Clamp/assert _r = r; _g = g; _b = b; _a = a; } // TODO // hsv, grey, etc. double r() const { return _r; } double g() const { return _g; } double b() const { return _b; } double a() const { return _a; } private { double _r, _g, _b, _a; } }