#include <scalerplugin.h>
|
| SourceScaler (const Graphics::PixelFormat &format) |
|
virtual void | setSource (const byte *src, uint pitch, int width, int height, int padding) final |
|
virtual void | enableSource (bool enable) final |
|
virtual uint | setFactor (uint factor) final |
|
| Scaler (const Graphics::PixelFormat &format) |
|
void | scale (const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y) |
|
virtual uint | increaseFactor ()=0 |
|
virtual uint | decreaseFactor ()=0 |
|
virtual uint | getFactor () const |
|
|
virtual void | scaleIntern (const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y) final |
|
virtual void | internScale (const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, const uint8 *oldSrcPtr, uint32 oldSrcPitch, int width, int height, const uint8 *buffer, uint32 bufferPitch)=0 |
|
Convenience class that implements some bookkeeping for keeping track of old source images.
◆ setSource()
virtual void SourceScaler::setSource |
( |
const byte * |
src, |
|
|
uint |
pitch, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
padding |
|
) |
| |
|
finalvirtual |
Set the source to be used when scaling and copying to the old buffer.
- Parameters
-
padding | The number of pixels on the border (Used to prevent memory access crashes) |
type | The surface type. This source will only be used when calling oldSrcScale with the same type. |
Reimplemented from Scaler.
◆ enableSource()
virtual void SourceScaler::enableSource |
( |
bool |
enable | ) |
|
|
inlinefinalvirtual |
Enable or disable the old Source functionality. It is initially disabled. When disabled, the old source data is preserved until re-enabled.
Useful for scaling a different surface (e.g. the cursor).
Reimplemented from Scaler.
◆ setFactor()
virtual uint SourceScaler::setFactor |
( |
uint |
factor | ) |
|
|
finalvirtual |
Set the scaling factor. Intended to be used with GUI to set a known valid factor. Plugins should override if they require additional state changes.
- Parameters
-
factor | A valid scaling factor for the plugin |
- Returns
- The old factor.
Reimplemented from Scaler.
◆ scaleIntern()
virtual void SourceScaler::scaleIntern |
( |
const uint8 * |
srcPtr, |
|
|
uint32 |
srcPitch, |
|
|
uint8 * |
dstPtr, |
|
|
uint32 |
dstPitch, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
|
finalprotectedvirtual |
◆ internScale()
virtual void SourceScaler::internScale |
( |
const uint8 * |
srcPtr, |
|
|
uint32 |
srcPitch, |
|
|
uint8 * |
dstPtr, |
|
|
uint32 |
dstPitch, |
|
|
const uint8 * |
oldSrcPtr, |
|
|
uint32 |
oldSrcPitch, |
|
|
int |
width, |
|
|
int |
height, |
|
|
const uint8 * |
buffer, |
|
|
uint32 |
bufferPitch |
|
) |
| |
|
protectedpure virtual |
Scalers must implement this function. It will be called by oldSrcScale. If by comparing the src and oldsrc images it is discovered that no change is necessary, do not write a pixel.
If oldSrcPtr is NULL, do not read from it. Scale every pixel.
Implemented in EdgeScaler.
The documentation for this class was generated from the following file: