|
| 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 uint | setFactor (uint factor) |
|
virtual void | setSource (const byte *src, uint pitch, int width, int height, int padding) |
|
virtual void | enableSource (bool enable) |
|
|
virtual void | scaleIntern (const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height, int x, int y)=0 |
|
◆ scale()
void Scaler::scale |
( |
const uint8 * |
srcPtr, |
|
|
uint32 |
srcPitch, |
|
|
uint8 * |
dstPtr, |
|
|
uint32 |
dstPitch, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
Scale a rect.
- Parameters
-
srcPtr | Pointer to the source buffer. |
srcPitch | The number of bytes in a scanline of the source. |
dstPtr | Pointer to the destination buffer. |
dstPitch | The number of bytes in a scanline of the destination. |
width | The width of the source rect to scale. |
height | The height of the source rect to scale. |
x | The x position of the source rect. |
y | The y position of the source rect. |
◆ increaseFactor()
virtual uint Scaler::increaseFactor |
( |
| ) |
|
|
pure virtual |
◆ decreaseFactor()
virtual uint Scaler::decreaseFactor |
( |
| ) |
|
|
pure virtual |
◆ setFactor()
virtual uint Scaler::setFactor |
( |
uint |
factor | ) |
|
|
inlinevirtual |
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 in SourceScaler.
◆ setSource()
virtual void Scaler::setSource |
( |
const byte * |
src, |
|
|
uint |
pitch, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
padding |
|
) |
| |
|
inlinevirtual |
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 in SourceScaler.
◆ enableSource()
virtual void Scaler::enableSource |
( |
bool |
enable | ) |
|
|
inlinevirtual |
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 in SourceScaler.
◆ scaleIntern()
virtual void Scaler::scaleIntern |
( |
const uint8 * |
srcPtr, |
|
|
uint32 |
srcPitch, |
|
|
uint8 * |
dstPtr, |
|
|
uint32 |
dstPitch, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
|
protectedpure virtual |
The documentation for this class was generated from the following file: