21 #ifndef GRAPHICS_SCALERPLUGIN_H 22 #define GRAPHICS_SCALERPLUGIN_H 24 #include "base/plugins.h" 25 #include "graphics/pixelformat.h" 26 #include "graphics/surface.h" 45 void scale(
const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr,
46 uint32 dstPitch,
int width,
int height,
int x,
int y);
60 virtual uint getFactor()
const {
return _factor; }
70 uint oldFactor = _factor;
81 virtual void setSource(
const byte *src, uint pitch,
int width,
int height,
int padding) {
101 virtual void scaleIntern(
const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr,
102 uint32 dstPitch,
int width,
int height,
int x,
int y) = 0;
119 virtual void setSource(
const byte *src, uint pitch,
int width,
int height,
int padding)
final;
123 virtual uint
setFactor(uint factor)
final;
127 virtual void scaleIntern(
const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr,
128 uint32 dstPitch,
int width,
int height,
int x,
int y)
final;
137 virtual void internScale(
const uint8 *srcPtr, uint32 srcPitch,
138 uint8 *dstPtr, uint32 dstPitch,
139 const uint8 *oldSrcPtr, uint32 oldSrcPitch,
140 int width,
int height,
const uint8 *buffer, uint32 bufferPitch) = 0;
144 int _width, _height, _padding;
159 bool hasFactor(uint factor)
const {
173 virtual uint extraPixels()
const = 0;
179 virtual bool canDrawCursor()
const = 0;
184 virtual const char *getPrettyName()
const = 0;
221 uint getMaxExtraPixels()
const;
226 Plugin *findScalerPlugin(
const char *name)
const;
231 uint findScalerPluginIndex(
const char *name)
const;
236 void updateOldSettings();
245 #define ScalerMan ScalerManager::instance() virtual void enableSource(bool enable)
Definition: scalerplugin.h:92
Definition: scalerplugin.h:112
virtual uint decreaseFactor()=0
iterator end()
Definition: array.h:379
iterator begin()
Definition: array.h:374
virtual void setSource(const byte *src, uint pitch, int width, int height, int padding)
Definition: scalerplugin.h:81
Definition: plugins.h:145
virtual void scaleIntern(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y)=0
const T * const_iterator
Definition: array.h:55
Definition: scalerplugin.h:150
Definition: plugins.h:131
virtual uint getDefaultFactor() const
Definition: scalerplugin.h:189
virtual bool useOldSource() const
Definition: scalerplugin.h:200
Definition: scalerplugin.h:209
Definition: scalerplugin.h:28
virtual uint increaseFactor()=0
virtual uint setFactor(uint factor)
Definition: scalerplugin.h:69
void scale(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y)
Definition: singleton.h:42
virtual void enableSource(bool enable) final
Definition: scalerplugin.h:121