diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-02-14 08:01:44 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-02-14 08:01:44 +0000 |
| commit | 01a37dfe1888f1ac6da7ab12c6e4d59ce104d12c (patch) | |
| tree | 63fa5cbb7476634aea8f8e4f0b7108023d83e102 /otk/truerendercontrol.cc | |
| parent | 49974f6916c98a23189daefa19dd79986629fe8f (diff) | |
allocate colors in pseudocolor from the map we allocate in the rendercontrol
Diffstat (limited to 'otk/truerendercontrol.cc')
| -rw-r--r-- | otk/truerendercontrol.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/otk/truerendercontrol.cc b/otk/truerendercontrol.cc index 1d5b8dc4..2f1b710e 100644 --- a/otk/truerendercontrol.cc +++ b/otk/truerendercontrol.cc @@ -99,4 +99,14 @@ void TrueRenderControl::reduceDepth(Surface &sf, XImage *im) const } } +void TrueRenderControl::allocateColor(XColor *color) const +{ + const ScreenInfo *info = display->screenInfo(_screen); + if (!XAllocColor(**display, info->colormap(), color)) { + fprintf(stderr, "TrueRenderControl: color alloc error: rgb:%x/%x/%x\n", + color->red & 0xff, color->green & 0xff, color->blue & 0xff); + color->pixel = 0; + } +} + } |
