From af9c9091ed69394171485aa4c4814504f86f2004 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 23 Jan 2012 20:08:12 +0100 Subject: Simple image blit. New slider class. New filenamelineedit. New pixelbuffer used for drawing everything but the root window - with alpha blending... --- plugingui/colour.cc | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) (limited to 'plugingui/colour.cc') 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: -- cgit v1.2.3