diff options
Diffstat (limited to 'src/Image.hh')
-rw-r--r-- | src/Image.hh | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/src/Image.hh b/src/Image.hh index 229d228..532476a 100644 --- a/src/Image.hh +++ b/src/Image.hh | |||
@@ -22,19 +22,16 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Image.hh,v 1.15 2002/10/13 21:57:07 fluxgen Exp $ | 25 | // $Id: Image.hh,v 1.16 2002/11/24 20:22:38 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef IMAGE_HH | 27 | #ifndef IMAGE_HH |
28 | #define IMAGE_HH | 28 | #define IMAGE_HH |
29 | 29 | ||
30 | #include "Timer.hh" | 30 | |
31 | #include "BaseDisplay.hh" | 31 | #include "BaseDisplay.hh" |
32 | #include "Color.hh" | 32 | #include "Color.hh" |
33 | #include "Texture.hh" | 33 | #include "Texture.hh" |
34 | 34 | #include "Timer.hh" | |
35 | #ifdef HAVE_CONFIG_H | ||
36 | #include "config.h" | ||
37 | #endif // HAVE_CONFIG_H | ||
38 | 35 | ||
39 | #include <X11/Xlib.h> | 36 | #include <X11/Xlib.h> |
40 | #include <X11/Xutil.h> | 37 | #include <X11/Xutil.h> |
@@ -47,7 +44,7 @@ class BImageControl; | |||
47 | */ | 44 | */ |
48 | class BImage { | 45 | class BImage { |
49 | public: | 46 | public: |
50 | BImage(BImageControl *ic, unsigned int, unsigned int); | 47 | BImage(BImageControl *ic, unsigned int width, unsigned int height); |
51 | ~BImage(); | 48 | ~BImage(); |
52 | /// render to pixmap | 49 | /// render to pixmap |
53 | Pixmap render(const FbTk::Texture *src_texture); | 50 | Pixmap render(const FbTk::Texture *src_texture); |
@@ -86,10 +83,7 @@ protected: | |||
86 | 83 | ||
87 | private: | 84 | private: |
88 | BImageControl *control; | 85 | BImageControl *control; |
89 | |||
90 | #ifdef INTERLACE | ||
91 | bool interlaced; | 86 | bool interlaced; |
92 | #endif // INTERLACE | ||
93 | 87 | ||
94 | XColor *colors; // color table | 88 | XColor *colors; // color table |
95 | 89 | ||
@@ -105,14 +99,12 @@ private: | |||
105 | */ | 99 | */ |
106 | class BImageControl : public TimeoutHandler { | 100 | class BImageControl : public TimeoutHandler { |
107 | public: | 101 | public: |
108 | BImageControl(BaseDisplay *disp, ScreenInfo *screen, bool = False, int = 4, | 102 | BImageControl(const ScreenInfo *screen, bool dither = false, int colors_per_channel = 4, |
109 | unsigned long = 300000l, unsigned long = 200l); | 103 | unsigned long cache_timeout = 300000l, unsigned long cache_max = 200l); |
110 | virtual ~BImageControl(); | 104 | virtual ~BImageControl(); |
111 | 105 | ||
112 | inline BaseDisplay *baseDisplay() { return basedisplay; } | 106 | inline bool doDither() const { return m_dither; } |
113 | 107 | inline Colormap colormap() const { return m_colormap; } | |
114 | inline bool doDither() { return dither; } | ||
115 | inline const Colormap &colormap() const { return m_colormap; } | ||
116 | inline const ScreenInfo *getScreenInfo() const { return screeninfo; } | 108 | inline const ScreenInfo *getScreenInfo() const { return screeninfo; } |
117 | inline Window drawable() const { return window; } | 109 | inline Window drawable() const { return window; } |
118 | 110 | ||
@@ -142,7 +134,7 @@ public: | |||
142 | void getXColorTable(XColor **, int *); | 134 | void getXColorTable(XColor **, int *); |
143 | void getGradientBuffers(unsigned int, unsigned int, | 135 | void getGradientBuffers(unsigned int, unsigned int, |
144 | unsigned int **, unsigned int **); | 136 | unsigned int **, unsigned int **); |
145 | void setDither(bool d) { dither = d; } | 137 | void setDither(bool d) { m_dither = d; } |
146 | void setColorsPerChannel(int cpc); | 138 | void setColorsPerChannel(int cpc); |
147 | 139 | ||
148 | virtual void timeout(); | 140 | virtual void timeout(); |
@@ -156,12 +148,10 @@ protected: | |||
156 | const FbTk::Color &color, const FbTk::Color &color_to); | 148 | const FbTk::Color &color, const FbTk::Color &color_to); |
157 | 149 | ||
158 | private: | 150 | private: |
159 | bool dither; | 151 | bool m_dither; |
160 | BaseDisplay *basedisplay; | 152 | const ScreenInfo *screeninfo; |
161 | ScreenInfo *screeninfo; | 153 | |
162 | #ifdef TIMEDCACHE | 154 | BTimer m_timer; |
163 | BTimer timer; | ||
164 | #endif // TIMEDCACHE | ||
165 | 155 | ||
166 | Colormap m_colormap; | 156 | Colormap m_colormap; |
167 | 157 | ||