diff options
Diffstat (limited to 'plugingui/colour.cc')
-rw-r--r-- | plugingui/colour.cc | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/plugingui/colour.cc b/plugingui/colour.cc index db2c8f6..01c4fc3 100644 --- a/plugingui/colour.cc +++ b/plugingui/colour.cc @@ -28,18 +28,18 @@ #include "globalcontext.h" -Colour::Colour() +GUI::Colour::Colour() { red = blue = green = alpha = 1.0; } -Colour::Colour(float grey, float a) +GUI::Colour::Colour(float grey, float a) { red = green = blue = grey; alpha = a; } -Colour::Colour(float r, float g, float b, float a) +GUI::Colour::Colour(float r, float g, float b, float a) { red = r; green = g; @@ -47,33 +47,6 @@ Colour::Colour(float r, float g, float b, float a) alpha = a; } -#ifdef X11 -int Colour::getColour(GlobalContext *gctx) -{ - XColor col; - Colormap colormap = DefaultColormap(gctx->display, 0); - // XParseColor(gctx->display, colormap, "#00FF00", &col); - col.red = 65535 * red; - col.green = 65535 * green; - col.blue = 65535 * blue; - col.flags = DoRed | DoGreen | DoBlue; - - XAllocColor(gctx->display, colormap, &col); - - return col.pixel; - /* - int colour; - - if(red == 1.0 && green == 1.0 && blue == 1.0) - colour = WhitePixel(gctx->display, DefaultScreen(gctx->display)); - else - colour = BlackPixel(gctx->display, DefaultScreen(gctx->display)); - - return colour; - */ -} -#endif/*X11*/ - #ifdef TEST_COLOUR //Additional dependency files //deps: |