version 2 showing authors affecting page license.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
SDL_!BlitSurface |
|
|
2 |
!!!SDL_!BlitSurface |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
RETURN VALUE |
|
|
7 |
SEE ALSO |
|
|
8 |
---- |
|
|
9 |
!!NAME |
|
|
10 |
|
|
|
11 |
|
|
|
12 |
SDL_!BlitSurface- This performs a fast blit from the source surface to the destination surface. |
|
|
13 |
!!SYNOPSIS |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
__#include __ |
|
|
17 |
|
|
|
18 |
|
|
|
19 |
__int SDL_!BlitSurface__(__SDL_Surface *src, SDL_Rect |
|
|
20 |
*srcrect, SDL_Surface *dst, SDL_Rect |
|
|
21 |
*dstrect__); |
|
|
22 |
!!DESCRIPTION |
|
|
23 |
|
|
|
24 |
|
|
|
25 |
This performs a fast blit from the source surface to the |
|
|
26 |
destination surface. |
|
|
27 |
|
|
|
28 |
|
|
|
29 |
Only the position is used in the __dstrect__ (the width |
|
|
30 |
and height are ignored). |
|
|
31 |
|
|
|
32 |
|
|
|
33 |
If either __srcrect__ or __dstrect__ are __NULL__, |
|
|
34 |
the entire surface (__src__ or __dst__) is |
|
|
35 |
copied. |
|
|
36 |
|
|
|
37 |
|
|
|
38 |
The final blit rectangle is saved in __dstrect__ after |
|
|
39 |
all clipping is performed (__srcrect__ is not |
|
|
40 |
modified). |
|
|
41 |
|
|
|
42 |
|
|
|
43 |
The blit function should not be called on a locked |
|
|
44 |
surface. |
|
|
45 |
|
|
|
46 |
|
|
|
47 |
__Note:__ |
|
|
48 |
|
|
|
49 |
|
|
|
50 |
The results of blitting operations vary greatly depending on |
|
|
51 |
whether __SDL_SRCAPLHA__ is set or not. See |
|
|
52 |
''SDL_!SetAlpha''. |
|
|
53 |
!!RETURN VALUE |
|
|
54 |
|
|
|
55 |
|
|
|
56 |
If the blit is successful, it returns __0__, otherwise it |
|
|
57 |
returns __-1__. |
|
|
58 |
|
|
|
59 |
|
|
|
60 |
If either of the surfaces were in video memory, and the blit |
|
|
61 |
returns __-2__, the video memory was lost, so it should |
|
|
62 |
be reloaded with artwork and re-blitted: |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
while ( SDL_!BlitSurface(image, imgrect, screen, dstrect) == -2 ) { |
|
|
66 |
while ( SDL_!LockSurface(image)) |
|
|
67 |
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. |
|
|
68 |
!!SEE ALSO |
|
|
69 |
|
|
|
70 |
|
|
|
71 |
__SDL_!LockSurface__, __SDL_!FillRect__, |
|
|
72 |
__SDL_Surface__, __SDL_Rect__ |
|
|
73 |
---- |