Initial revision
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401
This commit is contained in:
commit
2f110628a7
892 changed files with 170313 additions and 0 deletions
45
docs/man3/SDL_BlitSurface.3
Normal file
45
docs/man3/SDL_BlitSurface.3
Normal file
|
@ -0,0 +1,45 @@
|
|||
.TH "SDL_BlitSurface" "3" "Mon 12 Mar 2001, 01:04" "SDL" "SDL API Reference"
|
||||
.SH "NAME"
|
||||
SDL_BlitSurface\- This performs a fast blit from the source surface to the destination surface\&.
|
||||
.SH "SYNOPSIS"
|
||||
.PP
|
||||
\fB#include "SDL\&.h"
|
||||
.sp
|
||||
\fBint \fBSDL_BlitSurface\fP\fR(\fBSDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect\fR);
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
This performs a fast blit from the source surface to the destination surface\&.
|
||||
.PP
|
||||
Only the position is used in the \fBdstrect\fR (the width and height are ignored)\&.
|
||||
.PP
|
||||
If either \fBsrcrect\fR or \fBdstrect\fR are \fBNULL\fP, the entire surface (\fBsrc\fR or \fBdst\fR) is copied\&.
|
||||
.PP
|
||||
The final blit rectangle is saved in \fBdstrect\fR after all clipping is performed (\fBsrcrect\fR is not modified)\&.
|
||||
.PP
|
||||
The blit function should not be called on a locked surface\&.
|
||||
.PP
|
||||
.RS
|
||||
\fBNote:
|
||||
.PP
|
||||
The results of blitting operations vary greatly depending on whether \fBSDL_SRCAPLHA\fP is set or not\&. See \fISDL_SetAlpha\fR\&.
|
||||
.RE
|
||||
.SH "RETURN VALUE"
|
||||
.PP
|
||||
If the blit is successful, it returns \fB0\fR, otherwise it returns \fB-1\fR\&.
|
||||
.PP
|
||||
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:
|
||||
.PP
|
||||
.nf
|
||||
\f(CW while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) {
|
||||
while ( SDL_LockSurface(image)) < 0 )
|
||||
Sleep(10);
|
||||
-- Write image pixels to image->pixels --
|
||||
SDL_UnlockSurface(image);
|
||||
}\fR
|
||||
.fi
|
||||
.PP
|
||||
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\&.
|
||||
.SH "SEE ALSO"
|
||||
.PP
|
||||
\fI\fBSDL_LockSurface\fP\fR, \fI\fBSDL_FillRect\fP\fR, \fI\fBSDL_Surface\fR\fR, \fI\fBSDL_Rect\fR\fR
|
||||
...\" created by instant / docbook-to-man, Mon 12 Mar 2001, 01:04
|
Loading…
Add table
Add a link
Reference in a new issue