| 123456789101112131415161718192021222324252627282930313233343536 |
- #ifndef COLOR_HPP_INCLUDED
- #define COLOR_HPP_INCLUDED
- #include <stdint.h>
- #include <cairomm/context.h>
- namespace cx_light {
- class color {
- public:
- color();
- ~color();
-
- static color from_hex(long);
- static color from_rgb(uint8_t, uint8_t, uint8_t);
- static color from_white(long);
-
- uint8_t get_red();
- uint8_t get_green();
- uint8_t get_blue();
- double get_normalized_red();
- double get_normalized_green();
- double get_normalized_blue();
-
- void set_source(const Cairo::RefPtr<Cairo::Context> &);
- private:
- uint8_t red;
- uint8_t green;
- uint8_t blue;
- };
- }
- #endif
|