X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=resize_effect.h;h=774f510de592aedc4e0ae1991916629d62c64842;hp=54c2b31bcca6e20b7cdc409bd69a344e3d1ae22c;hb=2b6a8585772bf9ae742a2ee36144a0cdd5ba0524;hpb=e9d9fc790abdf093176a0314f4588c6b8146e5a2 diff --git a/resize_effect.h b/resize_effect.h index 54c2b31..774f510 100644 --- a/resize_effect.h +++ b/resize_effect.h @@ -1,27 +1,31 @@ -#ifndef _RESIZE_EFFECT_H -#define _RESIZE_EFFECT_H 1 +#ifndef _MOVIT_RESIZE_EFFECT_H +#define _MOVIT_RESIZE_EFFECT_H 1 // An effect that simply resizes the picture to a given output size // (set by the two integer parameters "width" and "height"). // Mostly useful as part of other algorithms. +#include + #include "effect.h" class ResizeEffect : public Effect { public: ResizeEffect(); + virtual std::string effect_type_id() const { return "ResizeEffect"; } std::string output_fragment_shader(); // We want processing done pre-filtering and mipmapped, // in case we need to scale down a lot. virtual bool need_texture_bounce() const { return true; } virtual bool needs_mipmaps() const { return true; } + virtual AlphaHandling alpha_handling() const { return INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK; } virtual bool changes_output_size() const { return true; } - virtual void get_output_size(unsigned *width, unsigned *height) const; + virtual void get_output_size(unsigned *width, unsigned *height, unsigned *virtual_width, unsigned *virtual_height) const; private: int width, height; }; -#endif // !defined(_RESIZE_EFFECT_H) +#endif // !defined(_MOVIT_RESIZE_EFFECT_H)