diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-06-09 09:45:03 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-06-09 09:45:03 +0200 |
commit | 21554166b294470ac593a1a90c82d1b4fe75c61e (patch) | |
tree | 4fe4c5782a0bbcef3e3309633e0c2ee7e71c4e2a /plugingui/colour.cc | |
parent | 108a94eaefc1e9ccfe316d4ce9a30e3bd532af5a (diff) |
Add ctor for creating colours from four unsigned char values.
Diffstat (limited to 'plugingui/colour.cc')
-rw-r--r-- | plugingui/colour.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugingui/colour.cc b/plugingui/colour.cc index d8cd8e9..dff1a82 100644 --- a/plugingui/colour.cc +++ b/plugingui/colour.cc @@ -54,6 +54,10 @@ Colour::Colour(float r, float g, float b, float a) data[3] = a; } +Colour::Colour(std::uint8_t r, std::uint8_t g, std::uint8_t b, std::uint8_t a) + : Colour(r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f) +{} + Colour::Colour(Colour&& other) { if(data) |