diff options
Diffstat (limited to 'layer_box.h')
-rw-r--r-- | layer_box.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/layer_box.h b/layer_box.h new file mode 100644 index 0000000..f6f6667 --- /dev/null +++ b/layer_box.h @@ -0,0 +1,37 @@ +#ifndef __HAVE_LAYER_BOX_H +#define __HAVE_LAYER_BOX_H + +#include <SDL.h> + +#include "osc_graphics.h" +#include "layer.h" + +class LayerBox : public Layer { + Sint16 x1, y1, x2, y2; + Uint8 r, g, b, a; + +public: + LayerBox(const char *name, SDL_Rect geo, float opacity, + SDL_Color color) : Layer(name) + { + LayerBox::geo(geo); + LayerBox::color(color); + LayerBox::alpha(opacity); + } + + void geo(SDL_Rect geo); + void alpha(float opacity); + + void + color(SDL_Color color) + { + r = color.r; + g = color.g; + b = color.b; + } + + + void frame(SDL_Surface *target); +}; + +#endif
\ No newline at end of file |