Sortix cross-nightly manual
This manual documents Sortix cross-nightly. You can instead view this document in the latest official manual.
SDL_BlitSurface(3) | SDL API Reference | SDL_BlitSurface(3) |
NAME
SDL_BlitSurface - This performs a fast blit from the source surface to the destination surface.SYNOPSIS
#include "SDL.h"DESCRIPTION
This performs a fast blit from the source surface to the destination surface.if (source surface has SDL_SRCALPHA set) {
if (source surface has alpha channel (that is, format->Amask != 0))
blit using per-pixel alpha, ignoring any colour key
else {
if (source surface has SDL_SRCCOLORKEY set)
blit using the colour key AND the per-surface alpha value
else
blit using the per-surface alpha value
}
} else {
if (source surface has SDL_SRCCOLORKEY set)
blit using the colour key
else
ordinary opaque rectangular blit
}
RETURN VALUE
If the blit is successful, it returns 0, otherwise it returns -1.while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) {
while ( SDL_LockSurface(image)) < 0 )
Sleep(10);
-- Write image pixels to image->pixels --
SDL_UnlockSurface(image);
}
This happens under DirectX 5.0 when the system switches away from your fullscreen application. Locking the surface will also fail until you have access to the video memory again.
SEE ALSO
SDL_LockSurface, SDL_FillRect, SDL_Surface, SDL_RectTue 11 Sep 2001, 23:01 | SDL |