aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/ImageControl.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/ImageControl.hh')
-rw-r--r--src/FbTk/ImageControl.hh19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/FbTk/ImageControl.hh b/src/FbTk/ImageControl.hh
index b7b90f7..747525b 100644
--- a/src/FbTk/ImageControl.hh
+++ b/src/FbTk/ImageControl.hh
@@ -30,7 +30,9 @@
30#include "NotCopyable.hh" 30#include "NotCopyable.hh"
31 31
32#include <X11/Xlib.h> // for Visual* etc 32#include <X11/Xlib.h> // for Visual* etc
33
33#include <list> 34#include <list>
35#include <vector>
34 36
35namespace FbTk { 37namespace FbTk {
36 38
@@ -45,9 +47,10 @@ public:
45 47
46 int depth() const { return m_screen_depth; } 48 int depth() const { return m_screen_depth; }
47 int colorsPerChannel() const { return m_colors_per_channel; } 49 int colorsPerChannel() const { return m_colors_per_channel; }
50 size_t nrColors() const { return m_colors.size(); }
51 const XColor* colors() const { return &m_colors[0]; }
48 int screenNumber() const { return m_screen_num; } 52 int screenNumber() const { return m_screen_num; }
49 Visual *visual() const { return m_visual; } 53 Visual *visual() const { return m_visual; }
50 unsigned long getSqrt(unsigned int val) const;
51 54
52 /** 55 /**
53 Render to pixmap 56 Render to pixmap
@@ -84,24 +87,24 @@ private:
84 87
85 Colormap m_colormap; 88 Colormap m_colormap;
86 89
87 Window m_root_window; 90 std::vector<XColor> m_colors; ///< color table
88
89 XColor *m_colors; ///< color table
90 unsigned int m_num_colors; ///< number of colors in color table
91 91
92 Visual *m_visual; 92 Visual *m_visual;
93 93
94 int bits_per_pixel, red_offset, green_offset, blue_offset, 94 int bits_per_pixel;
95 int red_offset, green_offset, blue_offset,
95 red_bits, green_bits, blue_bits; 96 red_bits, green_bits, blue_bits;
96 int m_colors_per_channel; ///< number of colors per channel 97 int m_colors_per_channel; ///< number of colors per channel
97 int m_screen_depth; ///< bit depth of screen 98 int m_screen_depth; ///< bit depth of screen
98 int m_screen_num; ///< screen number 99 int m_screen_num; ///< screen number
100
99 unsigned char red_color_table[256]; 101 unsigned char red_color_table[256];
100 unsigned char green_color_table[256]; 102 unsigned char green_color_table[256];
101 unsigned char blue_color_table[256]; 103 unsigned char blue_color_table[256];
102 104
103 unsigned int *grad_xbuffer, *grad_ybuffer, grad_buffer_width, 105 // TextureRenderer uses these buffers
104 grad_buffer_height; 106 std::vector<unsigned int> grad_xbuffer;
107 std::vector<unsigned int> grad_ybuffer;
105 108
106 struct Cache; 109 struct Cache;
107 typedef std::list<Cache *> CacheList; 110 typedef std::list<Cache *> CacheList;