1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __truerendercontrol_hh
3 #define __truerendercontrol_hh
5 #include "rendercontrol.hh"
12 # ifdef HAVE_SYS_TYPES_H
13 # include <sys/types.h>
24 typedef uint32_t pixel32;
25 typedef uint16_t pixel16;
27 typedef u_int32_t pixel32;
28 typedef u_int16_t pixel16;
29 #endif /* HAVE_STDINT_H */
31 #ifdef WORDS_BIGENDIAN
32 const int default_red_shift=0;
33 const int default_green_shift=8;
34 const int default_blue_shift=16;
36 const int default_red_shift=16;
37 const int default_green_shift=8;
38 const int default_blue_shift=0;
39 #endif /* WORDS_BIGENDIAN */
41 class TrueRenderControl : public RenderControl {
43 // the number of bits to shift a color value (from 0-255) to the right, to
44 // fit it into the the color mask (do this before the offset)
49 // the offset of each color in a color mask
55 TrueRenderControl(int screen);
56 virtual ~TrueRenderControl();
58 virtual void drawBackground(Surface& sf, const RenderTexture &texture) const;
59 virtual void drawGradientBackground(Surface &sf,
60 const RenderTexture &texture) const;
62 inline void highlight(pixel32 *x, pixel32 *y, bool raised) const;
63 void reduceDepth(XImage *im, pixel32 *data) const;
64 void verticalGradient(Surface &sf, const RenderTexture &texture,
66 void diagonalGradient(Surface &sf, const RenderTexture &texture,
68 void crossDiagonalGradient(Surface &sf, const RenderTexture &texture,
74 #endif // __truerendercontrol_hh