diff options
| author | Marius Nita <marius@cs.pdx.edu> | 2002-11-01 03:30:18 +0000 |
|---|---|---|
| committer | Marius Nita <marius@cs.pdx.edu> | 2002-11-01 03:30:18 +0000 |
| commit | 110a1eeed9b5d0deb127a02364cf6c6fe29a9de8 (patch) | |
| tree | 93f4bbe6f757ec830988e1aa7de80a4447b99962 /src/texture.hh | |
| parent | 9247a7a616809e45bd26774d5aed7d24c618e6f2 (diff) | |
moved files into otk
Diffstat (limited to 'src/texture.hh')
| -rw-r--r-- | src/texture.hh | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/src/texture.hh b/src/texture.hh deleted file mode 100644 index 514a0584..00000000 --- a/src/texture.hh +++ /dev/null @@ -1,92 +0,0 @@ -// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- -#ifndef TEXTURE_HH -#define TEXTURE_HH - -#include "color.hh" -#include "util.hh" -class BImageControl; - -#include <string> - -class BTexture { -public: - enum Type { - // No texture - NoTexture = (0), - // bevel options - Flat = (1l<<0), - Sunken = (1l<<1), - Raised = (1l<<2), - // textures - Solid = (1l<<3), - Gradient = (1l<<4), - // gradients - Horizontal = (1l<<5), - Vertical = (1l<<6), - Diagonal = (1l<<7), - CrossDiagonal = (1l<<8), - Rectangle = (1l<<9), - Pyramid = (1l<<10), - PipeCross = (1l<<11), - Elliptic = (1l<<12), - // bevel types - Bevel1 = (1l<<13), - Bevel2 = (1l<<14), - // flat border - Border = (1l<<15), - // inverted image - Invert = (1l<<16), - // parent relative image - Parent_Relative = (1l<<17), - // fake interlaced image - Interlaced = (1l<<18) - }; - - BTexture(const BaseDisplay * const _display = 0, - unsigned int _screen = ~(0u), BImageControl* _ctrl = 0); - BTexture(const std::string &_description, - const BaseDisplay * const _display = 0, - unsigned int _screen = ~(0u), BImageControl* _ctrl = 0); - - void setColor(const BColor &_color); - void setColorTo(const BColor &_colorTo) { ct = _colorTo; } - void setBorderColor(const BColor &_borderColor) { bc = _borderColor; } - - const BColor &color(void) const { return c; } - const BColor &colorTo(void) const { return ct; } - const BColor &lightColor(void) const { return lc; } - const BColor &shadowColor(void) const { return sc; } - const BColor &borderColor(void) const { return bc; } - - unsigned long texture(void) const { return t; } - void setTexture(const unsigned long _texture) { t = _texture; } - void addTexture(const unsigned long _texture) { t |= _texture; } - - BTexture &operator=(const BTexture &tt); - inline bool operator==(const BTexture &tt) - { return (c == tt.c && ct == tt.ct && lc == tt.lc && - sc == tt.sc && t == tt.t); } - inline bool operator!=(const BTexture &tt) - { return (! operator==(tt)); } - - const BaseDisplay *display(void) const { return dpy; } - unsigned int screen(void) const { return scrn; } - void setDisplay(const BaseDisplay * const _display, - const unsigned int _screen); - void setImageControl(BImageControl* _ctrl) { ctrl = _ctrl; } - const std::string &description(void) const { return descr; } - void setDescription(const std::string &d); - - Pixmap render(const unsigned int width, const unsigned int height, - const Pixmap old = 0); - -private: - BColor c, ct, lc, sc, bc; - std::string descr; - unsigned long t; - const BaseDisplay *dpy; - BImageControl *ctrl; - unsigned int scrn; -}; - -#endif // TEXTURE_HH |
