diff options
Diffstat (limited to 'graphics/transparent_surface.h')
-rw-r--r-- | graphics/transparent_surface.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/graphics/transparent_surface.h b/graphics/transparent_surface.h index 8654183548..6fcdac1735 100644 --- a/graphics/transparent_surface.h +++ b/graphics/transparent_surface.h @@ -68,6 +68,11 @@ enum AlphaType { ALPHA_FULL = 2 }; +enum TFilteringMode { + FILTER_NEAREST = 0, + FILTER_BILINEAR = 1 +}; + /** * A transparent graphics surface, which implements alpha blitting. */ @@ -141,8 +146,10 @@ struct TransparentSurface : public Graphics::Surface { * @param newHeight the resulting height. * @see TransformStruct */ - TransparentSurface *scale(uint16 newWidth, uint16 newHeight) const; + template <TFilteringMode filteringMode> + TransparentSurface *scaleT(uint16 newWidth, uint16 newHeight) const; + TransparentSurface *scale(uint16 newWidth, uint16 newHeight) const; /** * @brief Rotoscale function; this returns a transformed version of this surface after rotation and * scaling. Please do not use this if angle == 0, use plain old scaling function. @@ -150,6 +157,9 @@ struct TransparentSurface : public Graphics::Surface { * @param transform a TransformStruct wrapping the required info. @see TransformStruct * */ + template <TFilteringMode filteringMode> + TransparentSurface *rotoscaleT(const TransformStruct &transform) const; + TransparentSurface *rotoscale(const TransformStruct &transform) const; TransparentSurface *convertTo(const PixelFormat &dstFormat, const byte *palette = 0) const; |