]> Dogcows Code - chaz/openbox/blob - otk/truerendercontrol.hh
start on the rendering images code
[chaz/openbox] / otk / truerendercontrol.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __truerendercontrol_hh
3 #define __truerendercontrol_hh
4
5 #include "rendercontrol.hh"
6
7 #include <vector>
8
9 namespace otk {
10
11 class TrueRenderControl : public RenderControl {
12 private:
13 // the number of bits to shift a color value (from 0-255) to the right, to
14 // fit it into the the color mask (do this before the offset)
15 int _red_shift;
16 int _green_shift;
17 int _blue_shift;
18
19 // the offset of each color in a color mask
20 int _red_offset;
21 int _green_offset;
22 int _blue_offset;
23
24 inline void highlight(pixel32 *x, pixel32 *y, bool raised) const;
25 void reduceDepth(Surface &sf, XImage *im) const;
26 void verticalGradient(Surface &sf, const RenderTexture &texture) const;
27 void diagonalGradient(Surface &sf, const RenderTexture &texture) const;
28 void crossDiagonalGradient(Surface &sf, const RenderTexture &texture) const;
29 virtual void drawGradientBackground(Surface &sf,
30 const RenderTexture &texture) const;
31
32 public:
33 TrueRenderControl(int screen);
34 virtual ~TrueRenderControl();
35
36 virtual void drawBackground(Surface& sf, const RenderTexture &texture) const;
37
38 virtual void drawImage(Surface &sf, int w, int h,
39 unsigned long *data) const;
40 };
41
42 }
43
44 #endif // __truerendercontrol_hh
This page took 0.044028 seconds and 5 git commands to generate.