diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-09-21 18:24:57 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-09-21 18:24:57 +0200 |
commit | 75667b81215bdb3896599ec477a256c41fc90436 (patch) | |
tree | 44eb5919b596666997b972fc75fe5fdea60a633b /layer_box.h | |
parent | 0e81cd9a89de9bdd6824bbe7265f91f3835dae97 (diff) | |
download | osc-graphics-75667b81215bdb3896599ec477a256c41fc90436.tar.gz |
split program into multiple files; switched to C++
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 |