diff options
| author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-09-28 15:26:29 +0200 |
|---|---|---|
| committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-09-28 15:26:29 +0200 |
| commit | e7da86053b3df2882816b0df8089e1a51b61939f (patch) | |
| tree | 8f7430f7d1e82ddb8449548886f57a3a7c646c05 /layer_image.h | |
| parent | 9b134ea457f91ba8ea6ae558c9192f58c09f62bc (diff) | |
| download | osc-graphics-e7da86053b3df2882816b0df8089e1a51b61939f.tar.gz | |
autotools based build system
Diffstat (limited to 'layer_image.h')
| -rw-r--r-- | layer_image.h | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/layer_image.h b/layer_image.h deleted file mode 100644 index 5f2271f..0000000 --- a/layer_image.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef __LAYER_IMAGE_H -#define __LAYER_IMAGE_H - -#include <stdlib.h> -#include <stdio.h> - -#include <SDL.h> - -#include "osc_graphics.h" -#include "layer.h" - -class LayerImage : public Layer { - SDL_Surface *surf_alpha; /* with per-surface alpha */ - SDL_Surface *surf_scaled; /* scaled image */ - SDL_Surface *surf; /* original image */ - - SDL_Rect geov; - float alphav; - -public: - LayerImage(const char *name, - SDL_Rect geo = (SDL_Rect){0, 0, 0, 0}, - float opacity = 1., - const char *file = NULL); - - static CtorInfo ctor_info; - static Layer * - ctor_osc(const char *name, SDL_Rect geo, float opacity, lo_arg **argv) - { - return new LayerImage(name, geo, opacity, &argv[0]->s); - } - - ~LayerImage(); - - void frame(SDL_Surface *target); - -private: - void geo(SDL_Rect geo); - void alpha(float opacity); - - void file(const char *file = NULL); - OSCServer::MethodHandlerId *file_osc_id; - static void - file_osc(LayerImage *obj, lo_arg **argv) - { - obj->file(&argv[0]->s); - } -}; - -/* - * Macros - */ -#define SDL_IMAGE_ERROR(FMT, ...) do { \ - fprintf(stderr, "%s(%d): " FMT ": %s\n", \ - __FILE__, __LINE__, ##__VA_ARGS__, IMG_GetError()); \ -} while (0) - -#endif |
