diff options
author | fluxgen <fluxgen> | 2003-01-09 21:52:09 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-01-09 21:52:09 (GMT) |
commit | c9299fff8f5492df6aafce4455c1ee7cff1ab1f8 (patch) | |
tree | 4de76e3b6e3100bb9869ea0eaef2c0e38866e808 /src/TextureRender.hh | |
parent | 7dd4823340ae5f710a08ff3a8fbe4276defc6b85 (diff) | |
download | fluxbox_pavel-c9299fff8f5492df6aafce4455c1ee7cff1ab1f8.zip fluxbox_pavel-c9299fff8f5492df6aafce4455c1ee7cff1ab1f8.tar.bz2 |
moved to FbTk
Diffstat (limited to 'src/TextureRender.hh')
-rw-r--r-- | src/TextureRender.hh | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/src/TextureRender.hh b/src/TextureRender.hh deleted file mode 100644 index 06d5bb1..0000000 --- a/src/TextureRender.hh +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | // TextureRender.hh for fluxbox | ||
2 | // Copyright (c) 2002 Henrik Kinnunen (fluxgen at fluxbox.org) | ||
3 | // | ||
4 | // Image.hh for Blackbox - an X11 Window manager | ||
5 | // Copyright (c) 1997 - 2000 Brad Hughes (bhughes at tcac.net) | ||
6 | // | ||
7 | // Permission is hereby granted, free of charge, to any person obtaining a | ||
8 | // copy of this software and associated documentation files (the "Software"), | ||
9 | // to deal in the Software without restriction, including without limitation | ||
10 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
11 | // and/or sell copies of the Software, and to permit persons to whom the | ||
12 | // Software is furnished to do so, subject to the following conditions: | ||
13 | // | ||
14 | // The above copyright notice and this permission notice shall be included in | ||
15 | // all copies or substantial portions of the Software. | ||
16 | // | ||
17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
20 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
23 | // DEALINGS IN THE SOFTWARE. | ||
24 | |||
25 | // $Id: TextureRender.hh,v 1.3 2002/12/01 13:42:00 rathnor Exp $ | ||
26 | |||
27 | #ifndef TEXTURRENDER_HH | ||
28 | #define TEXTURRENDER_HH | ||
29 | |||
30 | #include "Texture.hh" | ||
31 | |||
32 | #include <X11/Xlib.h> | ||
33 | |||
34 | class BImageControl; | ||
35 | |||
36 | /** | ||
37 | Renders texture to pixmap | ||
38 | */ | ||
39 | class TextureRender { | ||
40 | public: | ||
41 | TextureRender(BImageControl &ic, unsigned int width, unsigned int height, | ||
42 | XColor *_colors=0, size_t num_colors=0); | ||
43 | ~TextureRender(); | ||
44 | /// render to pixmap | ||
45 | Pixmap render(const FbTk::Texture &src_texture); | ||
46 | /// render solid texture to pixmap | ||
47 | Pixmap renderSolid(const FbTk::Texture &src_texture); | ||
48 | /// render gradient texture to pixmap | ||
49 | Pixmap renderGradient(const FbTk::Texture &src_texture); | ||
50 | |||
51 | private: | ||
52 | /** | ||
53 | Render to pixmap | ||
54 | @return rendered pixmap | ||
55 | */ | ||
56 | Pixmap renderPixmap(); | ||
57 | /** | ||
58 | Render to XImage | ||
59 | @returns allocated and rendered XImage, user is responsible to deallocate | ||
60 | */ | ||
61 | XImage *renderXImage(); | ||
62 | /** | ||
63 | @name render functions | ||
64 | */ | ||
65 | //@{ | ||
66 | void invert(); | ||
67 | void bevel1(); | ||
68 | void bevel2(); | ||
69 | void dgradient(); | ||
70 | void egradient(); | ||
71 | void hgradient(); | ||
72 | void pgradient(); | ||
73 | void rgradient(); | ||
74 | void vgradient(); | ||
75 | void cdgradient(); | ||
76 | void pcgradient(); | ||
77 | //@} | ||
78 | void makeGradientBuffers(); | ||
79 | |||
80 | BImageControl &control; | ||
81 | bool interlaced; | ||
82 | |||
83 | XColor *colors; // color table | ||
84 | |||
85 | const FbTk::Color *from, *to; | ||
86 | int red_offset, green_offset, blue_offset, red_bits, green_bits, blue_bits, | ||
87 | ncolors, cpc, cpccpc; | ||
88 | unsigned char *red, *green, *blue; | ||
89 | const unsigned char *red_table, *green_table, *blue_table; | ||
90 | unsigned int width, height; | ||
91 | unsigned int *xtable, *ytable; | ||
92 | }; | ||
93 | |||
94 | #endif // TEXTURERENDER_HH | ||