GRAPHICS: add static methods for 1x and 1.5x scale
This commit is contained in:
parent
d350e2c7a8
commit
d56a7d610c
5 changed files with 34 additions and 7 deletions
|
@ -20,6 +20,7 @@
|
|||
*/
|
||||
|
||||
#include "graphics/scalerplugin.h"
|
||||
#include "graphics/scaler.h"
|
||||
|
||||
ScalerPluginObject::ScalerPluginObject() {
|
||||
_doScale = true;
|
||||
|
@ -32,3 +33,15 @@ void ScalerPluginObject::disableScaling() {
|
|||
void ScalerPluginObject::enableScaling() {
|
||||
_doScale = true;
|
||||
}
|
||||
|
||||
void ScalerPluginObject::scale1x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr,
|
||||
uint32 dstPitch, int width, int height, int bytesPerPixel) {
|
||||
assert(bytesPerPixel == 2); // TODO add support for 4 bytes
|
||||
Normal1x(srcPtr, srcPitch, dstPtr, dstPitch, width, height);
|
||||
}
|
||||
|
||||
void ScalerPluginObject::scale1o5x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr,
|
||||
uint32 dstPitch, int width, int height, int bytesPerPixel) {
|
||||
assert(bytesPerPixel == 2); // TODO add support for 4 bytes
|
||||
Normal1o5x(srcPtr, srcPitch, dstPtr, dstPitch, width, height);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue