MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / scale

Function scale

src/Engine/Scalers/scalebit.cpp:480–502  ·  view source on GitHub ↗

* Apply the Scale effect on a bitmap. * This function is simply a common interface for ::scale2x(), ::scale3x() and ::scale4x(). * \param scale Scale factor. 2, 203 (fox 2x3), 204 (for 2x4), 3 or 4. * \param void_dst Pointer at the first pixel of the destination bitmap. * \param dst_slice Size in bytes of a destination bitmap row. * \param void_src Pointer at the first pixel of the source bit

Source from the content-addressed store, hash-verified

478 * \param height Vertical size in pixels of the source bitmap.
479 */
480void scale(unsigned scale, void* void_dst, unsigned dst_slice, const void* void_src, unsigned src_slice, unsigned pixel, unsigned width, unsigned height)
481{
482 switch (scale) {
483 case 202 :
484 case 2 :
485 scale2x(void_dst, dst_slice, void_src, src_slice, pixel, width, height);
486 break;
487 case 203 :
488 scale2x3(void_dst, dst_slice, void_src, src_slice, pixel, width, height);
489 break;
490 case 204 :
491 scale2x4(void_dst, dst_slice, void_src, src_slice, pixel, width, height);
492 break;
493 case 303 :
494 case 3 :
495 scale3x(void_dst, dst_slice, void_src, src_slice, pixel, width, height);
496 break;
497 case 404 :
498 case 4 :
499 scale4x(void_dst, dst_slice, void_src, src_slice, pixel, width, height);
500 break;
501 }
502}
503

Callers 1

_zoomSurfaceYMethod · 0.85

Calls 5

scale2xFunction · 0.85
scale2x3Function · 0.85
scale2x4Function · 0.85
scale3xFunction · 0.85
scale4xFunction · 0.85

Tested by

no test coverage detected