X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=resize_effect.h;h=dff6dccdc3c02b0bc6e35103a553dcd0e6eff6fc;hp=4c3fe86c1991f231af8ad3cee7df2343d93b581e;hb=a5a795f293fcf84f24ddcebd062a5d433f7be8e4;hpb=f99ad333a7acbb6c8c995dbb036484ae8940c490 diff --git a/resize_effect.h b/resize_effect.h index 4c3fe86..dff6dcc 100644 --- a/resize_effect.h +++ b/resize_effect.h @@ -1,12 +1,16 @@ -#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" +namespace movit { + class ResizeEffect : public Effect { public: ResizeEffect(); @@ -17,12 +21,15 @@ public: // 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) +} // namespace movit + +#endif // !defined(_MOVIT_RESIZE_EFFECT_H)