Split SDL_BlitScaled into SDL_UpperBlitScaled and SDL_LowerBlitScaled.

Fixed issue when calling SDL_BlitScaled() directly with src or dst rectangles that were out of bounds.
This commit is contained in:
Ken Rogoway 2011-03-13 22:38:41 -05:00
parent 6f505f9608
commit 791cca44b5
2 changed files with 108 additions and 16 deletions

View file

@ -466,15 +466,23 @@ extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
SDL_Surface * dst,
const SDL_Rect * dstrect);
#define SDL_BlitScaled SDL_UpperBlitScaled
/**
* \brief Perform a fast, low quality, stretch blit between two surfaces of the
* different pixel formats.
*
* \note This function calls SDL_SoftStretch or SDL_LowerBlit.
* This is the public scaled blit function, SDL_BlitScaled(), and it performs
* rectangle validation and clipping before passing it to SDL_LowerBlitScaled()
*/
extern DECLSPEC int SDLCALL SDL_BlitScaled
extern DECLSPEC int SDLCALL SDL_UpperBlitScaled
(SDL_Surface * src, const SDL_Rect * srcrect,
SDL_Surface * dst, const SDL_Rect * dstrect);
SDL_Surface * dst, SDL_Rect * dstrect);
/**
* This is a semi-private blit function and it performs low-level surface
* scaled blitting only.
*/
extern DECLSPEC int SDLCALL SDL_LowerBlitScaled
(SDL_Surface * src, SDL_Rect * srcrect,
SDL_Surface * dst, SDL_Rect * dstrect);
/* Ends C function definitions when using C++ */