]>
Dogcows Code - chaz/openbox/blob - rendercontrol.hh
20ec8c1d5cffe201f10f1830e13cfe18dcd69ef3
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __rendercontrol_hh
3 #define __rendercontrol_hh
24 // color tables, meaning, 256 (possibly) different shades of each color,
25 // based on the number of bits there are available for each color in the
27 unsigned char _red_color_table[256];
28 unsigned char _green_color_table[256];
29 unsigned char _blue_color_table[256];
35 int _cpc; // colors-per-channel: must be a value between [2,6]
36 int _bpp; // bits-per-pixel
38 unsigned int *_grad_xbuffer;
39 unsigned int *_grad_ybuffer;
40 unsigned int _grad_buffer_width;
41 unsigned int _grad_buffer_height;
43 unsigned long *_sqrt_table;
45 // These values are all determined based on a visual
47 int _red_bits; // the number of bits (1-255) that each shade of color
48 int _green_bits; // spans across. best case is 1, which gives 255 shades.
50 unsigned char _red_color_table[256];
51 unsigned char _green_color_table[256];
52 unsigned char _blue_color_table[256];
54 // These are only used for TrueColor visuals
55 int _red_offset; // the offset of each color in a color mask
59 // These are only used for !TrueColor visuals
64 RenderControl(int screen
);
67 virtual ~RenderControl();
69 static RenderControl
*getRenderControl(int screen
);
71 //! Draws a string onto a Surface
72 virtual void drawString(Surface
& sf
, const Font
&font
, int x
, int y
,
73 const Color
&color
, const ustring
&string
) const;
75 //! Draws a background onto a Surface, as specified by a RenderTexture
76 virtual void drawBackground(Surface
&sf
,
77 const RenderTexture
&texture
) const = 0;
82 #endif // __rendercontrol_hh
This page took 0.034676 seconds and 3 git commands to generate.