aboutsummaryrefslogtreecommitdiff
path: root/src/Image.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-08-04 15:55:13 (GMT)
committerfluxgen <fluxgen>2002-08-04 15:55:13 (GMT)
commit56a41b23f9b5ecdef5e9536c2e6eeed0db32e623 (patch)
tree8b6fd3a735918278d54f1d108042d90df696169f /src/Image.hh
parent380d50ba274c0ceb0a2f973ea464792847a80e6d (diff)
downloadfluxbox-56a41b23f9b5ecdef5e9536c2e6eeed0db32e623.zip
fluxbox-56a41b23f9b5ecdef5e9536c2e6eeed0db32e623.tar.bz2
doxygen comments
Diffstat (limited to 'src/Image.hh')
-rw-r--r--src/Image.hh43
1 files changed, 29 insertions, 14 deletions
diff --git a/src/Image.hh b/src/Image.hh
index c43e50b..7ae8b36 100644
--- a/src/Image.hh
+++ b/src/Image.hh
@@ -22,24 +22,25 @@
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.10 2002/07/23 17:11:59 fluxgen Exp $ 25// $Id: Image.hh,v 1.11 2002/08/04 15:55:13 fluxgen Exp $
26 26
27#ifndef IMAGE_HH 27#ifndef IMAGE_HH
28#define IMAGE_HH 28#define IMAGE_HH
29 29
30#include <X11/Xlib.h>
31#include <X11/Xutil.h>
32
33#include "Timer.hh" 30#include "Timer.hh"
34#include "BaseDisplay.hh" 31#include "BaseDisplay.hh"
35
36#include "Color.hh" 32#include "Color.hh"
37#include "Texture.hh" 33#include "Texture.hh"
38 34
35#include <X11/Xlib.h>
36#include <X11/Xutil.h>
39#include <list> 37#include <list>
40 38
41class BImageControl; 39class BImageControl;
42 40
41/**
42 Renders to pixmap
43*/
43class BImage { 44class BImage {
44public: 45public:
45 BImage(BImageControl *ic, unsigned int, unsigned int); 46 BImage(BImageControl *ic, unsigned int, unsigned int);
@@ -62,7 +63,10 @@ protected:
62 @returns allocated and rendered XImage, user is responsible to deallocate 63 @returns allocated and rendered XImage, user is responsible to deallocate
63 */ 64 */
64 XImage *renderXImage(); 65 XImage *renderXImage();
65 66 /**
67 @name render functions
68 */
69 //@{
66 void invert(); 70 void invert();
67 void bevel1(); 71 void bevel1();
68 void bevel2(); 72 void bevel2();
@@ -74,6 +78,7 @@ protected:
74 void vgradient(); 78 void vgradient();
75 void cdgradient(); 79 void cdgradient();
76 void pcgradient(); 80 void pcgradient();
81 //@}
77 82
78private: 83private:
79 BImageControl *control; 84 BImageControl *control;
@@ -91,7 +96,9 @@ private:
91 unsigned int width, height, *xtable, *ytable; 96 unsigned int width, height, *xtable, *ytable;
92}; 97};
93 98
94 99/**
100 Holds screen info and color tables
101*/
95class BImageControl : public TimeoutHandler { 102class BImageControl : public TimeoutHandler {
96public: 103public:
97 BImageControl(BaseDisplay *disp, ScreenInfo *screen, bool = False, int = 4, 104 BImageControl(BaseDisplay *disp, ScreenInfo *screen, bool = False, int = 4,
@@ -102,13 +109,14 @@ public:
102 109
103 inline bool doDither() { return dither; } 110 inline bool doDither() { return dither; }
104 inline const Colormap &colormap() const { return m_colormap; } 111 inline const Colormap &colormap() const { return m_colormap; }
105 inline ScreenInfo *getScreenInfo() { return screeninfo; } 112 inline const ScreenInfo *getScreenInfo() const { return screeninfo; }
106
107 inline Window drawable() const { return window; } 113 inline Window drawable() const { return window; }
108 114
115 /// @return visual of screen
109 inline Visual *visual() { return screeninfo->getVisual(); } 116 inline Visual *visual() { return screeninfo->getVisual(); }
110 117 /// @return Bits per pixel of screen
111 inline int bitsPerPixel() const { return bits_per_pixel; } 118 inline int bitsPerPixel() const { return bits_per_pixel; }
119 /// @return depth of screen
112 inline int depth() const { return screen_depth; } 120 inline int depth() const { return screen_depth; }
113 inline int colorsPerChannel() const { return colors_per_channel; } 121 inline int colorsPerChannel() const { return colors_per_channel; }
114 122
@@ -116,7 +124,13 @@ public:
116 unsigned long color(const char *, unsigned char *, unsigned char *, 124 unsigned long color(const char *, unsigned char *, unsigned char *,
117 unsigned char *); 125 unsigned char *);
118 unsigned long getSqrt(unsigned int val); 126 unsigned long getSqrt(unsigned int val);
119 127 /**
128 Render to pixmap
129 @param width width of pixmap
130 @param height height of pixmap
131 @param src_texture texture type to render
132 @return pixmap of the rendered image, on failure None
133 */
120 Pixmap renderImage(unsigned int width, unsigned int height, 134 Pixmap renderImage(unsigned int width, unsigned int height,
121 const FbTk::Texture *src_texture); 135 const FbTk::Texture *src_texture);
122 136
@@ -153,7 +167,8 @@ private:
153 Colormap m_colormap; 167 Colormap m_colormap;
154 168
155 Window window; 169 Window window;
156 XColor *colors; // color table 170 XColor *colors; ///< color table
171
157 int colors_per_channel, ncolors, screen_number, screen_depth, 172 int colors_per_channel, ncolors, screen_number, screen_depth,
158 bits_per_pixel, red_offset, green_offset, blue_offset, 173 bits_per_pixel, red_offset, green_offset, blue_offset,
159 red_bits, green_bits, blue_bits; 174 red_bits, green_bits, blue_bits;
@@ -179,5 +194,5 @@ private:
179}; 194};
180 195
181 196
182#endif // __Image_hh 197#endif // IMAGE_HH
183 198