]> icculus.org git repositories - dana/openbox.git/blob - otk/pseudorendercontrol.hh
use the same alogo to pick a color in allocateColor as in reduceDepth, break it off...
[dana/openbox.git] / otk / pseudorendercontrol.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __pseudorendercontrol_hh
3 #define __pseudorendercontrol_hh
4
5 #include "rendercontrol.hh"
6
7 namespace otk {
8
9 class PseudoRenderControl : public RenderControl {
10 private:
11   int _bpc;        // number of bits per color
12   int _ncolors;    // number of allocated colors, size of the XColor array
13   XColor *_colors; // the valid allocated colors
14   
15   virtual void reduceDepth(Surface &sf, XImage *im) const;
16
17   const XColor *pickColor(int r, int g, int b) const;
18   
19 public:
20   PseudoRenderControl(int screen);
21   virtual ~PseudoRenderControl();
22
23   virtual void allocateColor(XColor *color) const;
24 };
25
26 }
27
28 #endif // __pseudorendercontrol_hh