Mercurial > sdl-ios-xcode
annotate docs/html/sdlsurface.html @ 310:c97c1d3b3b5c
Blit bug fix from John Popplewell
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 20 Mar 2002 02:21:46 +0000 |
parents | e5bc29de3f0a |
children | 355632dca928 |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL_Surface</TITLE | |
5 ><META | |
6 NAME="GENERATOR" | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64 |
0 | 8 "><LINK |
9 REL="HOME" | |
10 TITLE="SDL Library Documentation" | |
11 HREF="index.html"><LINK | |
12 REL="UP" | |
13 TITLE="Video" | |
14 HREF="video.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="SDL_PixelFormat" | |
17 HREF="sdlpixelformat.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="SDL_VideoInfo" | |
20 HREF="sdlvideoinfo.html"></HEAD | |
21 ><BODY | |
22 CLASS="REFENTRY" | |
23 BGCOLOR="#FFF8DC" | |
24 TEXT="#000000" | |
25 LINK="#0000ee" | |
26 VLINK="#551a8b" | |
27 ALINK="#ff0000" | |
28 ><DIV | |
29 CLASS="NAVHEADER" | |
30 ><TABLE | |
31 WIDTH="100%" | |
32 BORDER="0" | |
33 CELLPADDING="0" | |
34 CELLSPACING="0" | |
35 ><TR | |
36 ><TH | |
37 COLSPAN="3" | |
38 ALIGN="center" | |
39 >SDL Library Documentation</TH | |
40 ></TR | |
41 ><TR | |
42 ><TD | |
43 WIDTH="10%" | |
44 ALIGN="left" | |
45 VALIGN="bottom" | |
46 ><A | |
47 HREF="sdlpixelformat.html" | |
48 >Prev</A | |
49 ></TD | |
50 ><TD | |
51 WIDTH="80%" | |
52 ALIGN="center" | |
53 VALIGN="bottom" | |
54 ></TD | |
55 ><TD | |
56 WIDTH="10%" | |
57 ALIGN="right" | |
58 VALIGN="bottom" | |
59 ><A | |
60 HREF="sdlvideoinfo.html" | |
61 >Next</A | |
62 ></TD | |
63 ></TR | |
64 ></TABLE | |
65 ><HR | |
66 ALIGN="LEFT" | |
67 WIDTH="100%"></DIV | |
68 ><H1 | |
69 ><A | |
70 NAME="SDLSURFACE" | |
71 >SDL_Surface</A | |
72 ></H1 | |
73 ><DIV | |
74 CLASS="REFNAMEDIV" | |
75 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
76 NAME="AEN2879" |
0 | 77 ></A |
78 ><H2 | |
79 >Name</H2 | |
80 >SDL_Surface -- Graphical Surface Structure</DIV | |
81 ><DIV | |
82 CLASS="REFSECT1" | |
83 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
84 NAME="AEN2882" |
0 | 85 ></A |
86 ><H2 | |
87 >Structure Definition</H2 | |
88 ><PRE | |
89 CLASS="PROGRAMLISTING" | |
90 >typedef struct SDL_Surface { | |
91 Uint32 flags; /* Read-only */ | |
92 SDL_PixelFormat *format; /* Read-only */ | |
93 int w, h; /* Read-only */ | |
94 Uint16 pitch; /* Read-only */ | |
95 void *pixels; /* Read-write */ | |
96 | |
97 /* clipping information */ | |
98 SDL_Rect clip_rect; /* Read-only */ | |
99 | |
100 /* Reference count -- used when freeing surface */ | |
101 int refcount; /* Read-mostly */ | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
102 |
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
103 /* This structure also contains private fields not shown here */ |
0 | 104 } SDL_Surface;</PRE |
105 ></DIV | |
106 ><DIV | |
107 CLASS="REFSECT1" | |
108 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
109 NAME="AEN2885" |
0 | 110 ></A |
111 ><H2 | |
112 >Structure Data</H2 | |
113 ><DIV | |
114 CLASS="INFORMALTABLE" | |
115 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
116 NAME="AEN2887" |
0 | 117 ></A |
118 ><P | |
119 ></P | |
120 ><TABLE | |
121 BORDER="0" | |
122 CLASS="CALSTABLE" | |
123 ><TBODY | |
124 ><TR | |
125 ><TD | |
126 ALIGN="LEFT" | |
127 VALIGN="TOP" | |
128 ><TT | |
129 CLASS="STRUCTFIELD" | |
130 ><I | |
131 >flags</I | |
132 ></TT | |
133 ></TD | |
134 ><TD | |
135 ALIGN="LEFT" | |
136 VALIGN="TOP" | |
137 >Surface flags</TD | |
138 ></TR | |
139 ><TR | |
140 ><TD | |
141 ALIGN="LEFT" | |
142 VALIGN="TOP" | |
143 ><TT | |
144 CLASS="STRUCTFIELD" | |
145 ><I | |
146 >format</I | |
147 ></TT | |
148 ></TD | |
149 ><TD | |
150 ALIGN="LEFT" | |
151 VALIGN="TOP" | |
152 >Pixel <A | |
153 HREF="sdlpixelformat.html" | |
154 >format</A | |
155 ></TD | |
156 ></TR | |
157 ><TR | |
158 ><TD | |
159 ALIGN="LEFT" | |
160 VALIGN="TOP" | |
161 ><TT | |
162 CLASS="STRUCTFIELD" | |
163 ><I | |
164 >w, h</I | |
165 ></TT | |
166 ></TD | |
167 ><TD | |
168 ALIGN="LEFT" | |
169 VALIGN="TOP" | |
170 >Width and height of the surface</TD | |
171 ></TR | |
172 ><TR | |
173 ><TD | |
174 ALIGN="LEFT" | |
175 VALIGN="TOP" | |
176 ><TT | |
177 CLASS="STRUCTFIELD" | |
178 ><I | |
179 >pitch</I | |
180 ></TT | |
181 ></TD | |
182 ><TD | |
183 ALIGN="LEFT" | |
184 VALIGN="TOP" | |
185 >Length of a surface scanline in bytes</TD | |
186 ></TR | |
187 ><TR | |
188 ><TD | |
189 ALIGN="LEFT" | |
190 VALIGN="TOP" | |
191 ><TT | |
192 CLASS="STRUCTFIELD" | |
193 ><I | |
194 >pixels</I | |
195 ></TT | |
196 ></TD | |
197 ><TD | |
198 ALIGN="LEFT" | |
199 VALIGN="TOP" | |
200 >Pointer to the actual pixel data</TD | |
201 ></TR | |
202 ><TR | |
203 ><TD | |
204 ALIGN="LEFT" | |
205 VALIGN="TOP" | |
206 ><TT | |
207 CLASS="STRUCTFIELD" | |
208 ><I | |
209 >clip_rect</I | |
210 ></TT | |
211 ></TD | |
212 ><TD | |
213 ALIGN="LEFT" | |
214 VALIGN="TOP" | |
215 >surface clip <A | |
216 HREF="sdlrect.html" | |
217 >rectangle</A | |
218 ></TD | |
219 ></TR | |
220 ></TBODY | |
221 ></TABLE | |
222 ><P | |
223 ></P | |
224 ></DIV | |
225 ></DIV | |
226 ><DIV | |
227 CLASS="REFSECT1" | |
228 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
229 NAME="AEN2916" |
0 | 230 ></A |
231 ><H2 | |
232 >Description</H2 | |
233 ><P | |
234 ><SPAN | |
235 CLASS="STRUCTNAME" | |
236 >SDL_Surface</SPAN | |
237 >'s represent areas of "graphical" | |
238 memory, memory that can be drawn to. The video framebuffer is returned | |
239 as a <SPAN | |
240 CLASS="STRUCTNAME" | |
241 >SDL_Surface</SPAN | |
242 > by | |
243 <A | |
244 HREF="sdlsetvideomode.html" | |
245 ><TT | |
246 CLASS="FUNCTION" | |
247 >SDL_SetVideoMode</TT | |
248 ></A | |
249 > | |
250 and <A | |
251 HREF="sdlgetvideosurface.html" | |
252 ><TT | |
253 CLASS="FUNCTION" | |
254 >SDL_GetVideoSurface</TT | |
255 ></A | |
256 >. | |
257 Most of the fields should be pretty obvious. | |
258 <TT | |
259 CLASS="STRUCTFIELD" | |
260 ><I | |
261 >w</I | |
262 ></TT | |
263 > and <TT | |
264 CLASS="STRUCTFIELD" | |
265 ><I | |
266 >h</I | |
267 ></TT | |
268 > are the | |
269 width and height of the surface in pixels. | |
270 <TT | |
271 CLASS="STRUCTFIELD" | |
272 ><I | |
273 >pixels</I | |
274 ></TT | |
275 > is a pointer to the actual pixel data, | |
276 the surface should be <A | |
277 HREF="sdllocksurface.html" | |
278 >locked</A | |
279 > | |
280 before accessing this field. The <TT | |
281 CLASS="STRUCTFIELD" | |
282 ><I | |
283 >clip_rect</I | |
284 ></TT | |
285 > field | |
286 is the clipping rectangle as set by | |
287 <A | |
288 HREF="sdlsetcliprect.html" | |
289 ><TT | |
290 CLASS="FUNCTION" | |
291 >SDL_SetClipRect</TT | |
292 ></A | |
293 >.</P | |
294 ><P | |
295 >The following are supported in the | |
296 <TT | |
297 CLASS="STRUCTFIELD" | |
298 ><I | |
299 >flags</I | |
300 ></TT | |
301 > field.</P | |
302 ><DIV | |
303 CLASS="INFORMALTABLE" | |
304 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
305 NAME="AEN2934" |
0 | 306 ></A |
307 ><P | |
308 ></P | |
309 ><TABLE | |
310 BORDER="1" | |
311 CLASS="CALSTABLE" | |
312 ><TBODY | |
313 ><TR | |
314 ><TD | |
315 ALIGN="LEFT" | |
316 VALIGN="TOP" | |
317 ><TT | |
318 CLASS="LITERAL" | |
319 >SDL_SWSURFACE</TT | |
320 ></TD | |
321 ><TD | |
322 ALIGN="LEFT" | |
323 VALIGN="TOP" | |
324 >Surface is stored in system memory</TD | |
325 ></TR | |
326 ><TR | |
327 ><TD | |
328 ALIGN="LEFT" | |
329 VALIGN="TOP" | |
330 ><TT | |
331 CLASS="LITERAL" | |
332 >SDL_HWSURFACE</TT | |
333 ></TD | |
334 ><TD | |
335 ALIGN="LEFT" | |
336 VALIGN="TOP" | |
337 >Surface is stored in video memory</TD | |
338 ></TR | |
339 ><TR | |
340 ><TD | |
341 ALIGN="LEFT" | |
342 VALIGN="TOP" | |
343 ><TT | |
344 CLASS="LITERAL" | |
345 >SDL_ASYNCBLIT</TT | |
346 ></TD | |
347 ><TD | |
348 ALIGN="LEFT" | |
349 VALIGN="TOP" | |
350 >Surface uses asynchronous blits if possible</TD | |
351 ></TR | |
352 ><TR | |
353 ><TD | |
354 ALIGN="LEFT" | |
355 VALIGN="TOP" | |
356 ><TT | |
357 CLASS="LITERAL" | |
358 >SDL_ANYFORMAT</TT | |
359 ></TD | |
360 ><TD | |
361 ALIGN="LEFT" | |
362 VALIGN="TOP" | |
363 >Allows any pixel-format (Display surface)</TD | |
364 ></TR | |
365 ><TR | |
366 ><TD | |
367 ALIGN="LEFT" | |
368 VALIGN="TOP" | |
369 ><TT | |
370 CLASS="LITERAL" | |
371 >SDL_HWPALETTE</TT | |
372 ></TD | |
373 ><TD | |
374 ALIGN="LEFT" | |
375 VALIGN="TOP" | |
376 >Surface has exclusive palette</TD | |
377 ></TR | |
378 ><TR | |
379 ><TD | |
380 ALIGN="LEFT" | |
381 VALIGN="TOP" | |
382 ><TT | |
383 CLASS="LITERAL" | |
384 >SDL_DOUBLEBUF</TT | |
385 ></TD | |
386 ><TD | |
387 ALIGN="LEFT" | |
388 VALIGN="TOP" | |
389 >Surface is double buffered (Display surface)</TD | |
390 ></TR | |
391 ><TR | |
392 ><TD | |
393 ALIGN="LEFT" | |
394 VALIGN="TOP" | |
395 ><TT | |
396 CLASS="LITERAL" | |
397 >SDL_FULLSCREEN</TT | |
398 ></TD | |
399 ><TD | |
400 ALIGN="LEFT" | |
401 VALIGN="TOP" | |
402 >Surface is full screen (Display Surface)</TD | |
403 ></TR | |
404 ><TR | |
405 ><TD | |
406 ALIGN="LEFT" | |
407 VALIGN="TOP" | |
408 ><TT | |
409 CLASS="LITERAL" | |
410 >SDL_OPENGL</TT | |
411 ></TD | |
412 ><TD | |
413 ALIGN="LEFT" | |
414 VALIGN="TOP" | |
415 >Surface has an OpenGL context (Display Surface)</TD | |
416 ></TR | |
417 ><TR | |
418 ><TD | |
419 ALIGN="LEFT" | |
420 VALIGN="TOP" | |
421 ><TT | |
422 CLASS="LITERAL" | |
423 >SDL_OPENGLBLIT</TT | |
424 ></TD | |
425 ><TD | |
426 ALIGN="LEFT" | |
427 VALIGN="TOP" | |
428 >Surface supports OpenGL blitting (Display Surface)</TD | |
429 ></TR | |
430 ><TR | |
431 ><TD | |
432 ALIGN="LEFT" | |
433 VALIGN="TOP" | |
434 ><TT | |
435 CLASS="LITERAL" | |
436 >SDL_RESIZABLE</TT | |
437 ></TD | |
438 ><TD | |
439 ALIGN="LEFT" | |
440 VALIGN="TOP" | |
441 >Surface is resizable (Display Surface)</TD | |
442 ></TR | |
443 ><TR | |
444 ><TD | |
445 ALIGN="LEFT" | |
446 VALIGN="TOP" | |
447 ><TT | |
448 CLASS="LITERAL" | |
449 >SDL_HWACCEL</TT | |
450 ></TD | |
451 ><TD | |
452 ALIGN="LEFT" | |
453 VALIGN="TOP" | |
454 >Surface blit uses hardware acceleration</TD | |
455 ></TR | |
456 ><TR | |
457 ><TD | |
458 ALIGN="LEFT" | |
459 VALIGN="TOP" | |
460 ><TT | |
461 CLASS="LITERAL" | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
462 >SDL_SRCCOLORKEY</TT |
0 | 463 ></TD |
464 ><TD | |
465 ALIGN="LEFT" | |
466 VALIGN="TOP" | |
467 >Surface use colorkey blitting</TD | |
468 ></TR | |
469 ><TR | |
470 ><TD | |
471 ALIGN="LEFT" | |
472 VALIGN="TOP" | |
473 ><TT | |
474 CLASS="LITERAL" | |
475 >SDL_RLEACCEL</TT | |
476 ></TD | |
477 ><TD | |
478 ALIGN="LEFT" | |
479 VALIGN="TOP" | |
480 >Colorkey blitting is accelerated with RLE</TD | |
481 ></TR | |
482 ><TR | |
483 ><TD | |
484 ALIGN="LEFT" | |
485 VALIGN="TOP" | |
486 ><TT | |
487 CLASS="LITERAL" | |
488 >SDL_SRCALPHA</TT | |
489 ></TD | |
490 ><TD | |
491 ALIGN="LEFT" | |
492 VALIGN="TOP" | |
493 >Surface blit uses alpha blending</TD | |
494 ></TR | |
495 ><TR | |
496 ><TD | |
497 ALIGN="LEFT" | |
498 VALIGN="TOP" | |
499 ><TT | |
500 CLASS="LITERAL" | |
501 >SDL_PREALLOC</TT | |
502 ></TD | |
503 ><TD | |
504 ALIGN="LEFT" | |
505 VALIGN="TOP" | |
506 >Surface uses preallocated memory</TD | |
507 ></TR | |
508 ></TBODY | |
509 ></TABLE | |
510 ><P | |
511 ></P | |
512 ></DIV | |
513 ></DIV | |
514 ><DIV | |
515 CLASS="REFSECT1" | |
516 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
517 NAME="AEN2997" |
0 | 518 ></A |
519 ><H2 | |
520 >See Also</H2 | |
521 ><P | |
522 ><A | |
523 HREF="sdlpixelformat.html" | |
524 ><SPAN | |
525 CLASS="STRUCTNAME" | |
526 >SDL_PixelFormat</SPAN | |
527 ></A | |
528 ></P | |
529 ></DIV | |
530 ><DIV | |
531 CLASS="NAVFOOTER" | |
532 ><HR | |
533 ALIGN="LEFT" | |
534 WIDTH="100%"><TABLE | |
535 WIDTH="100%" | |
536 BORDER="0" | |
537 CELLPADDING="0" | |
538 CELLSPACING="0" | |
539 ><TR | |
540 ><TD | |
541 WIDTH="33%" | |
542 ALIGN="left" | |
543 VALIGN="top" | |
544 ><A | |
545 HREF="sdlpixelformat.html" | |
546 >Prev</A | |
547 ></TD | |
548 ><TD | |
549 WIDTH="34%" | |
550 ALIGN="center" | |
551 VALIGN="top" | |
552 ><A | |
553 HREF="index.html" | |
554 >Home</A | |
555 ></TD | |
556 ><TD | |
557 WIDTH="33%" | |
558 ALIGN="right" | |
559 VALIGN="top" | |
560 ><A | |
561 HREF="sdlvideoinfo.html" | |
562 >Next</A | |
563 ></TD | |
564 ></TR | |
565 ><TR | |
566 ><TD | |
567 WIDTH="33%" | |
568 ALIGN="left" | |
569 VALIGN="top" | |
570 >SDL_PixelFormat</TD | |
571 ><TD | |
572 WIDTH="34%" | |
573 ALIGN="center" | |
574 VALIGN="top" | |
575 ><A | |
576 HREF="video.html" | |
577 >Up</A | |
578 ></TD | |
579 ><TD | |
580 WIDTH="33%" | |
581 ALIGN="right" | |
582 VALIGN="top" | |
583 >SDL_VideoInfo</TD | |
584 ></TR | |
585 ></TABLE | |
586 ></DIV | |
587 ></BODY | |
588 ></HTML | |
589 > |