Mercurial > sdl-ios-xcode
comparison docs/html/sdlblitsurface.html @ 803:355632dca928
Updated SDL HTML documentation
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 10 Feb 2004 15:15:40 +0000 |
parents | e5bc29de3f0a |
children |
comparison
equal
deleted
inserted
replaced
802:3c609d54f100 | 803:355632dca928 |
---|---|
2 ><HEAD | 2 ><HEAD |
3 ><TITLE | 3 ><TITLE |
4 >SDL_BlitSurface</TITLE | 4 >SDL_BlitSurface</TITLE |
5 ><META | 5 ><META |
6 NAME="GENERATOR" | 6 NAME="GENERATOR" |
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64 | 7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ |
8 "><LINK | 8 "><LINK |
9 REL="HOME" | 9 REL="HOME" |
10 TITLE="SDL Library Documentation" | 10 TITLE="SDL Library Documentation" |
11 HREF="index.html"><LINK | 11 HREF="index.html"><LINK |
12 REL="UP" | 12 REL="UP" |
26 VLINK="#551a8b" | 26 VLINK="#551a8b" |
27 ALINK="#ff0000" | 27 ALINK="#ff0000" |
28 ><DIV | 28 ><DIV |
29 CLASS="NAVHEADER" | 29 CLASS="NAVHEADER" |
30 ><TABLE | 30 ><TABLE |
31 SUMMARY="Header navigation table" | |
31 WIDTH="100%" | 32 WIDTH="100%" |
32 BORDER="0" | 33 BORDER="0" |
33 CELLPADDING="0" | 34 CELLPADDING="0" |
34 CELLSPACING="0" | 35 CELLSPACING="0" |
35 ><TR | 36 ><TR |
43 WIDTH="10%" | 44 WIDTH="10%" |
44 ALIGN="left" | 45 ALIGN="left" |
45 VALIGN="bottom" | 46 VALIGN="bottom" |
46 ><A | 47 ><A |
47 HREF="sdlconvertsurface.html" | 48 HREF="sdlconvertsurface.html" |
49 ACCESSKEY="P" | |
48 >Prev</A | 50 >Prev</A |
49 ></TD | 51 ></TD |
50 ><TD | 52 ><TD |
51 WIDTH="80%" | 53 WIDTH="80%" |
52 ALIGN="center" | 54 ALIGN="center" |
56 WIDTH="10%" | 58 WIDTH="10%" |
57 ALIGN="right" | 59 ALIGN="right" |
58 VALIGN="bottom" | 60 VALIGN="bottom" |
59 ><A | 61 ><A |
60 HREF="sdlfillrect.html" | 62 HREF="sdlfillrect.html" |
63 ACCESSKEY="N" | |
61 >Next</A | 64 >Next</A |
62 ></TD | 65 ></TD |
63 ></TR | 66 ></TR |
64 ></TABLE | 67 ></TABLE |
65 ><HR | 68 ><HR |
66 ALIGN="LEFT" | 69 ALIGN="LEFT" |
67 WIDTH="100%"></DIV | 70 WIDTH="100%"></DIV |
68 ><H1 | 71 ><H1 |
69 ><A | 72 ><A |
70 NAME="SDLBLITSURFACE" | 73 NAME="SDLBLITSURFACE" |
71 >SDL_BlitSurface</A | 74 ></A |
72 ></H1 | 75 >SDL_BlitSurface</H1 |
73 ><DIV | 76 ><DIV |
74 CLASS="REFNAMEDIV" | 77 CLASS="REFNAMEDIV" |
75 ><A | 78 ><A |
76 NAME="AEN1915" | 79 NAME="AEN2299" |
77 ></A | 80 ></A |
78 ><H2 | 81 ><H2 |
79 >Name</H2 | 82 >Name</H2 |
80 >SDL_BlitSurface -- This performs a fast blit from the source surface to the destination surface.</DIV | 83 >SDL_BlitSurface -- This performs a fast blit from the source surface to the destination surface.</DIV |
81 ><DIV | 84 ><DIV |
82 CLASS="REFSYNOPSISDIV" | 85 CLASS="REFSYNOPSISDIV" |
83 ><A | 86 ><A |
84 NAME="AEN1918" | 87 NAME="AEN2302" |
85 ></A | 88 ></A |
86 ><H2 | 89 ><H2 |
87 >Synopsis</H2 | 90 >Synopsis</H2 |
88 ><DIV | 91 ><DIV |
89 CLASS="FUNCSYNOPSIS" | 92 CLASS="FUNCSYNOPSIS" |
90 ><A | 93 ><A |
91 NAME="AEN1919" | 94 NAME="AEN2303" |
92 ></A | 95 ></A |
93 ><P | 96 ><P |
94 ></P | 97 ></P |
95 ><PRE | 98 ><PRE |
96 CLASS="FUNCSYNOPSISINFO" | 99 CLASS="FUNCSYNOPSISINFO" |
110 ></DIV | 113 ></DIV |
111 ></DIV | 114 ></DIV |
112 ><DIV | 115 ><DIV |
113 CLASS="REFSECT1" | 116 CLASS="REFSECT1" |
114 ><A | 117 ><A |
115 NAME="AEN1925" | 118 NAME="AEN2309" |
116 ></A | 119 ></A |
117 ><H2 | 120 ><H2 |
118 >Description</H2 | 121 >Description</H2 |
119 ><P | 122 ><P |
120 >This performs a fast blit from the source surface to the destination surface.</P | 123 >This performs a fast blit from the source surface to the destination surface.</P |
121 ><P | 124 ><P |
122 >Only the position is used in the <TT | 125 >The width and height in <TT |
126 CLASS="PARAMETER" | |
127 ><I | |
128 >srcrect</I | |
129 ></TT | |
130 > determine the | |
131 size of the copied rectangle. Only the position is used in the | |
132 <TT | |
123 CLASS="PARAMETER" | 133 CLASS="PARAMETER" |
124 ><I | 134 ><I |
125 >dstrect</I | 135 >dstrect</I |
126 ></TT | 136 ></TT |
127 > (the | 137 > (the width and height are ignored).</P |
128 width and height are ignored).</P | 138 ><P |
129 ><P | 139 >If <TT |
130 >If either <TT | |
131 CLASS="PARAMETER" | 140 CLASS="PARAMETER" |
132 ><I | 141 ><I |
133 >srcrect</I | 142 >srcrect</I |
134 ></TT | 143 ></TT |
135 > or | 144 > is <TT |
136 <TT | |
137 CLASS="PARAMETER" | |
138 ><I | |
139 >dstrect</I | |
140 ></TT | |
141 > are <TT | |
142 CLASS="LITERAL" | 145 CLASS="LITERAL" |
143 >NULL</TT | 146 >NULL</TT |
144 >, the entire | 147 >, the |
145 surface (<TT | 148 entire surface is copied. If <TT |
146 CLASS="PARAMETER" | 149 CLASS="PARAMETER" |
147 ><I | 150 ><I |
148 >src</I | 151 >dstrect</I |
149 ></TT | 152 ></TT |
150 > or <TT | 153 > is |
151 CLASS="PARAMETER" | 154 <TT |
152 ><I | 155 CLASS="LITERAL" |
153 >dst</I | 156 >NULL</TT |
154 ></TT | 157 >, then the destination position (upper left |
155 >) is | 158 corner) is (0, 0).</P |
156 copied.</P | |
157 ><P | 159 ><P |
158 >The final blit rectangle is saved in | 160 >The final blit rectangle is saved in |
159 <TT | 161 <TT |
160 CLASS="PARAMETER" | 162 CLASS="PARAMETER" |
161 ><I | 163 ><I |
198 ></P | 200 ></P |
199 ></DIV | 201 ></DIV |
200 ><DIV | 202 ><DIV |
201 CLASS="REFSECT1" | 203 CLASS="REFSECT1" |
202 ><A | 204 ><A |
203 NAME="AEN1944" | 205 NAME="AEN2328" |
204 ></A | 206 ></A |
205 ><H2 | 207 ><H2 |
206 >Return Value</H2 | 208 >Return Value</H2 |
207 ><P | 209 ><P |
208 >If the blit is successful, it returns <SPAN | 210 >If the blit is successful, it returns <SPAN |
222 reloaded with artwork and re-blitted: | 224 reloaded with artwork and re-blitted: |
223 <PRE | 225 <PRE |
224 CLASS="PROGRAMLISTING" | 226 CLASS="PROGRAMLISTING" |
225 > while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) { | 227 > while ( SDL_BlitSurface(image, imgrect, screen, dstrect) == -2 ) { |
226 while ( SDL_LockSurface(image)) < 0 ) | 228 while ( SDL_LockSurface(image)) < 0 ) |
227 Sleep(10); | 229 SDL_Delay(10); |
228 -- Write image pixels to image->pixels -- | 230 -- Write image pixels to image->pixels -- |
229 SDL_UnlockSurface(image); | 231 SDL_UnlockSurface(image); |
230 }</PRE | 232 }</PRE |
231 > | 233 > |
232 This happens under DirectX 5.0 when the system switches away from your | 234 This happens under DirectX 5.0 when the system switches away from your |
234 have access to the video memory again.</P | 236 have access to the video memory again.</P |
235 ></DIV | 237 ></DIV |
236 ><DIV | 238 ><DIV |
237 CLASS="REFSECT1" | 239 CLASS="REFSECT1" |
238 ><A | 240 ><A |
239 NAME="AEN1952" | 241 NAME="AEN2336" |
240 ></A | 242 ></A |
241 ><H2 | 243 ><H2 |
242 >See Also</H2 | 244 >See Also</H2 |
243 ><P | 245 ><P |
244 ><A | 246 ><A |
273 ><DIV | 275 ><DIV |
274 CLASS="NAVFOOTER" | 276 CLASS="NAVFOOTER" |
275 ><HR | 277 ><HR |
276 ALIGN="LEFT" | 278 ALIGN="LEFT" |
277 WIDTH="100%"><TABLE | 279 WIDTH="100%"><TABLE |
280 SUMMARY="Footer navigation table" | |
278 WIDTH="100%" | 281 WIDTH="100%" |
279 BORDER="0" | 282 BORDER="0" |
280 CELLPADDING="0" | 283 CELLPADDING="0" |
281 CELLSPACING="0" | 284 CELLSPACING="0" |
282 ><TR | 285 ><TR |
284 WIDTH="33%" | 287 WIDTH="33%" |
285 ALIGN="left" | 288 ALIGN="left" |
286 VALIGN="top" | 289 VALIGN="top" |
287 ><A | 290 ><A |
288 HREF="sdlconvertsurface.html" | 291 HREF="sdlconvertsurface.html" |
292 ACCESSKEY="P" | |
289 >Prev</A | 293 >Prev</A |
290 ></TD | 294 ></TD |
291 ><TD | 295 ><TD |
292 WIDTH="34%" | 296 WIDTH="34%" |
293 ALIGN="center" | 297 ALIGN="center" |
294 VALIGN="top" | 298 VALIGN="top" |
295 ><A | 299 ><A |
296 HREF="index.html" | 300 HREF="index.html" |
301 ACCESSKEY="H" | |
297 >Home</A | 302 >Home</A |
298 ></TD | 303 ></TD |
299 ><TD | 304 ><TD |
300 WIDTH="33%" | 305 WIDTH="33%" |
301 ALIGN="right" | 306 ALIGN="right" |
302 VALIGN="top" | 307 VALIGN="top" |
303 ><A | 308 ><A |
304 HREF="sdlfillrect.html" | 309 HREF="sdlfillrect.html" |
310 ACCESSKEY="N" | |
305 >Next</A | 311 >Next</A |
306 ></TD | 312 ></TD |
307 ></TR | 313 ></TR |
308 ><TR | 314 ><TR |
309 ><TD | 315 ><TD |
315 WIDTH="34%" | 321 WIDTH="34%" |
316 ALIGN="center" | 322 ALIGN="center" |
317 VALIGN="top" | 323 VALIGN="top" |
318 ><A | 324 ><A |
319 HREF="video.html" | 325 HREF="video.html" |
326 ACCESSKEY="U" | |
320 >Up</A | 327 >Up</A |
321 ></TD | 328 ></TD |
322 ><TD | 329 ><TD |
323 WIDTH="33%" | 330 WIDTH="33%" |
324 ALIGN="right" | 331 ALIGN="right" |