diff options
Diffstat (limited to 'src/TextureRender.hh')
-rw-r--r-- | src/TextureRender.hh | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/src/TextureRender.hh b/src/TextureRender.hh index 1ce72fa..06d5bb1 100644 --- a/src/TextureRender.hh +++ b/src/TextureRender.hh | |||
@@ -22,7 +22,7 @@ | |||
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: TextureRender.hh,v 1.2 2002/11/30 20:36:22 fluxgen Exp $ | 25 | // $Id: TextureRender.hh,v 1.3 2002/12/01 13:42:00 rathnor Exp $ |
26 | 26 | ||
27 | #ifndef TEXTURRENDER_HH | 27 | #ifndef TEXTURRENDER_HH |
28 | #define TEXTURRENDER_HH | 28 | #define TEXTURRENDER_HH |
@@ -38,57 +38,57 @@ class BImageControl; | |||
38 | */ | 38 | */ |
39 | class TextureRender { | 39 | class TextureRender { |
40 | public: | 40 | public: |
41 | TextureRender(BImageControl &ic, unsigned int width, unsigned int height, | 41 | TextureRender(BImageControl &ic, unsigned int width, unsigned int height, |
42 | XColor *_colors=0, size_t num_colors=0); | 42 | XColor *_colors=0, size_t num_colors=0); |
43 | ~TextureRender(); | 43 | ~TextureRender(); |
44 | /// render to pixmap | 44 | /// render to pixmap |
45 | Pixmap render(const FbTk::Texture &src_texture); | 45 | Pixmap render(const FbTk::Texture &src_texture); |
46 | /// render solid texture to pixmap | 46 | /// render solid texture to pixmap |
47 | Pixmap renderSolid(const FbTk::Texture &src_texture); | 47 | Pixmap renderSolid(const FbTk::Texture &src_texture); |
48 | /// render gradient texture to pixmap | 48 | /// render gradient texture to pixmap |
49 | Pixmap renderGradient(const FbTk::Texture &src_texture); | 49 | Pixmap renderGradient(const FbTk::Texture &src_texture); |
50 | 50 | ||
51 | private: | 51 | private: |
52 | /** | 52 | /** |
53 | Render to pixmap | 53 | Render to pixmap |
54 | @return rendered pixmap | 54 | @return rendered pixmap |
55 | */ | 55 | */ |
56 | Pixmap renderPixmap(); | 56 | Pixmap renderPixmap(); |
57 | /** | 57 | /** |
58 | Render to XImage | 58 | Render to XImage |
59 | @returns allocated and rendered XImage, user is responsible to deallocate | 59 | @returns allocated and rendered XImage, user is responsible to deallocate |
60 | */ | 60 | */ |
61 | XImage *renderXImage(); | 61 | XImage *renderXImage(); |
62 | /** | 62 | /** |
63 | @name render functions | 63 | @name render functions |
64 | */ | 64 | */ |
65 | //@{ | 65 | //@{ |
66 | void invert(); | 66 | void invert(); |
67 | void bevel1(); | 67 | void bevel1(); |
68 | void bevel2(); | 68 | void bevel2(); |
69 | void dgradient(); | 69 | void dgradient(); |
70 | void egradient(); | 70 | void egradient(); |
71 | void hgradient(); | 71 | void hgradient(); |
72 | void pgradient(); | 72 | void pgradient(); |
73 | void rgradient(); | 73 | void rgradient(); |
74 | void vgradient(); | 74 | void vgradient(); |
75 | void cdgradient(); | 75 | void cdgradient(); |
76 | void pcgradient(); | 76 | void pcgradient(); |
77 | //@} | 77 | //@} |
78 | void makeGradientBuffers(); | 78 | void makeGradientBuffers(); |
79 | 79 | ||
80 | BImageControl &control; | 80 | BImageControl &control; |
81 | bool interlaced; | 81 | bool interlaced; |
82 | 82 | ||
83 | XColor *colors; // color table | 83 | XColor *colors; // color table |
84 | 84 | ||
85 | const FbTk::Color *from, *to; | 85 | const FbTk::Color *from, *to; |
86 | int red_offset, green_offset, blue_offset, red_bits, green_bits, blue_bits, | 86 | int red_offset, green_offset, blue_offset, red_bits, green_bits, blue_bits, |
87 | ncolors, cpc, cpccpc; | 87 | ncolors, cpc, cpccpc; |
88 | unsigned char *red, *green, *blue; | 88 | unsigned char *red, *green, *blue; |
89 | const unsigned char *red_table, *green_table, *blue_table; | 89 | const unsigned char *red_table, *green_table, *blue_table; |
90 | unsigned int width, height; | 90 | unsigned int width, height; |
91 | unsigned int *xtable, *ytable; | 91 | unsigned int *xtable, *ytable; |
92 | }; | 92 | }; |
93 | 93 | ||
94 | #endif // TEXTURERENDER_HH | 94 | #endif // TEXTURERENDER_HH |