Mercurial > sdl-ios-xcode
comparison docs/man3/SDL_BlitSurface.3 @ 0:74212992fb08
Initial revision
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Thu, 26 Apr 2001 16:45:43 +0000 |
parents | |
children | 55f1f1b3e27d |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:74212992fb08 |
---|---|
1 .TH "SDL_BlitSurface" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference" | |
2 .SH "NAME" | |
3 SDL_BlitSurface\- This performs a fast blit from the source surface to the destination surface\&. | |
4 .SH "SYNOPSIS" | |
5 .PP | |
6 \fB#include "SDL\&.h" | |
7 .sp | |
8 \fBint \fBSDL_BlitSurface\fP\fR(\fBSDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect\fR); | |
9 .SH "DESCRIPTION" | |
10 .PP | |
11 This performs a fast blit from the source surface to the destination surface\&. | |
12 .PP | |
13 Only the position is used in the \fBdstrect\fR (the width and height are ignored)\&. | |
14 .PP | |
15 If either \fBsrcrect\fR or \fBdstrect\fR are \fBNULL\fP, the entire surface (\fBsrc\fR or \fBdst\fR) is copied\&. | |
16 .PP | |
17 The final blit rectangle is saved in \fBdstrect\fR after all clipping is performed (\fBsrcrect\fR is not modified)\&. | |
18 .PP | |
19 The blit function should not be called on a locked surface\&. | |
20 .PP | |
21 .RS | |
22 \fBNote: | |
23 .PP | |
24 The results of blitting operations vary greatly depending on whether \fBSDL_SRCAPLHA\fP is set or not\&. See \fISDL_SetAlpha\fR\&. | |
25 .RE | |
26 .SH "RETURN VALUE" | |
27 .PP | |
28 If the blit is successful, it returns \fB0\fR, otherwise it returns \fB-1\fR\&. | |
29 .PP | |
30 If either of the surfaces were in video memory, and the blit returns \fB-2\fR, the video memory was lost, so it should be reloaded with artwork and re-blitted: | |
31 .PP | |
32 .nf | |
33 \f(CW while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) { | |
34 while ( SDL_LockSurface(image)) < 0 ) | |
35 Sleep(10); | |
36 -- Write image pixels to image->pixels -- | |
37 SDL_UnlockSurface(image); | |
38 }\fR | |
39 .fi | |
40 .PP | |
41 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\&. | |
42 .SH "SEE ALSO" | |
43 .PP | |
44 \fI\fBSDL_LockSurface\fP\fR, \fI\fBSDL_FillRect\fP\fR, \fI\fBSDL_Surface\fR\fR, \fI\fBSDL_Rect\fR\fR | |
45 ...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04 |