summaryrefslogtreecommitdiff
path: root/plugingui/colour.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2012-01-23 20:08:12 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2012-01-23 20:08:12 +0100
commitaf9c9091ed69394171485aa4c4814504f86f2004 (patch)
tree070b911dc8faed486c8e8829f0f41aec7d5b4350 /plugingui/colour.cc
parent5e4cb10f72ef69d73fbd2c1bc42465c9111a4c41 (diff)
Simple image blit. New slider class. New filenamelineedit. New pixelbuffer used for drawing everything but the root window - with alpha blending...
Diffstat (limited to 'plugingui/colour.cc')
-rw-r--r--plugingui/colour.cc33
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: