5131 |
clevermous |
1 |
|
|
|
2 |
> |
|
|
3 |
> |
|
|
4 |
>SDL_Surface |
|
|
5 |
> |
|
|
6 |
NAME="GENERATOR" |
|
|
7 |
CONTENT="Modular DocBook HTML Stylesheet Version 1.64 |
|
|
8 |
"> |
|
|
9 |
REL="HOME" |
|
|
10 |
TITLE="SDL Library Documentation" |
|
|
11 |
HREF="index.html"> |
|
|
12 |
REL="UP" |
|
|
13 |
TITLE="Video" |
|
|
14 |
HREF="video.html"> |
|
|
15 |
REL="PREVIOUS" |
|
|
16 |
TITLE="SDL_PixelFormat" |
|
|
17 |
HREF="sdlpixelformat.html"> |
|
|
18 |
REL="NEXT" |
|
|
19 |
TITLE="SDL_VideoInfo" |
|
|
20 |
HREF="sdlvideoinfo.html"> |
|
|
21 |
> |
|
|
22 |
CLASS="REFENTRY" |
|
|
23 |
BGCOLOR="#FFF8DC" |
|
|
24 |
TEXT="#000000" |
|
|
25 |
LINK="#0000ee" |
|
|
26 |
VLINK="#551a8b" |
|
|
27 |
ALINK="#ff0000" |
|
|
28 |
> |
|
|
29 |
CLASS="NAVHEADER" |
|
|
30 |
>
|
|
31 |
WIDTH="100%" |
|
|
32 |
BORDER="0" |
|
|
33 |
CELLPADDING="0" |
|
|
34 |
CELLSPACING="0" |
|
|
35 |
>
|
|
36 |
> | |
|
|
37 |
COLSPAN="3" |
|
|
38 |
ALIGN="center" |
|
|
39 |
>SDL Library Documentation |
|
|
40 |
> | |
|
|
41 |
>
|
|
42 |
> |
|
|
|
43 |
WIDTH="10%" |
|
|
44 |
ALIGN="left" |
|
|
45 |
VALIGN="bottom" |
|
|
46 |
> |
|
|
47 |
HREF="sdlpixelformat.html" |
|
|
48 |
>Prev |
|
|
49 |
> |
|
|
50 |
> |
|
|
|
51 |
WIDTH="80%" |
|
|
52 |
ALIGN="center" |
|
|
53 |
VALIGN="bottom" |
|
|
54 |
> |
|
|
55 |
> |
|
|
|
56 |
WIDTH="10%" |
|
|
57 |
ALIGN="right" |
|
|
58 |
VALIGN="bottom" |
|
|
59 |
> |
|
|
60 |
HREF="sdlvideoinfo.html" |
|
|
61 |
>Next |
|
|
62 |
> |
|
|
63 |
> | |
|
|
64 |
> | |
|
|
65 |
>
|
|
|
66 |
ALIGN="LEFT" |
|
|
67 |
WIDTH="100%"> |
|
|
68 |
> |
|
|
69 |
> |
|
|
70 |
NAME="SDLSURFACE" |
|
|
71 |
>SDL_Surface |
|
|
72 |
> |
|
|
73 |
> |
|
|
74 |
CLASS="REFNAMEDIV" |
|
|
75 |
> |
|
|
76 |
NAME="AEN2841" |
|
|
77 |
> |
|
|
78 |
> |
|
|
79 |
>Name |
|
|
80 |
>SDL_Surface -- Graphical Surface Structure |
|
|
81 |
> |
|
|
82 |
CLASS="REFSECT1" |
|
|
83 |
> |
|
|
84 |
NAME="AEN2844" |
|
|
85 |
> |
|
|
86 |
> |
|
|
87 |
>Structure Definition |
|
|
88 |
> |
|
|
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 */ |
|
|
102 |
|
|
|
103 |
/* This structure also contains private fields not shown here */ |
|
|
104 |
} SDL_Surface; |
|
|
105 |
> |
|
|
106 |
> |
|
|
107 |
CLASS="REFSECT1" |
|
|
108 |
> |
|
|
109 |
NAME="AEN2847" |
|
|
110 |
> |
|
|
111 |
> |
|
|
112 |
>Structure Data |
|
|
113 |
> |
|
|
114 |
CLASS="INFORMALTABLE" |
|
|
115 |
> |
|
|
116 |
NAME="AEN2849" |
|
|
117 |
> |
|
|
118 |
> |
|
|
119 |
> |
|
|
120 |
> |
|
|
222 |
> |
|
|
223 |
> |
|
|
224 |
> |
|
|
225 |
> |
|
|
226 |
> |
|
|
227 |
CLASS="REFSECT1" |
|
|
228 |
> |
|
|
229 |
NAME="AEN2878" |
|
|
230 |
> |
|
|
231 |
> |
|
|
232 |
>Description |
|
|
233 |
> |
|
|
234 |
> |
|
|
235 |
CLASS="STRUCTNAME" |
|
|
236 |
>SDL_Surface |
|
|
237 |
>'s represent areas of "graphical" |
|
|
238 |
memory, memory that can be drawn to. The video framebuffer is returned |
|
|
239 |
as a |
|
|
240 |
CLASS="STRUCTNAME" |
|
|
241 |
>SDL_Surface |
|
|
242 |
> by |
|
|
243 |
|
|
|
244 |
HREF="sdlsetvideomode.html" |
|
|
245 |
> |
|
|
246 |
CLASS="FUNCTION" |
|
|
247 |
>SDL_SetVideoMode |
|
|
248 |
> |
|
|
249 |
> |
|
|
250 |
and |
|
|
251 |
HREF="sdlgetvideosurface.html" |
|
|
252 |
> |
|
|
253 |
CLASS="FUNCTION" |
|
|
254 |
>SDL_GetVideoSurface |
|
|
255 |
> |
|
|
256 |
>. |
|
|
257 |
Most of the fields should be pretty obvious. |
|
|
258 |
|
|
|
259 |
CLASS="STRUCTFIELD" |
|
|
260 |
> |
|
|
261 |
>w |
|
|
262 |
> |
|
|
263 |
> and |
|
|
264 |
CLASS="STRUCTFIELD" |
|
|
265 |
> |
|
|
266 |
>h |
|
|
267 |
> |
|
|
268 |
> are the |
|
|
269 |
width and height of the surface in pixels. |
|
|
270 |
|
|
|
271 |
CLASS="STRUCTFIELD" |
|
|
272 |
> |
|
|
273 |
>pixels |
|
|
274 |
> |
|
|
275 |
> is a pointer to the actual pixel data, |
|
|
276 |
the surface should be |
|
|
277 |
HREF="sdllocksurface.html" |
|
|
278 |
>locked |
|
|
279 |
> |
|
|
280 |
before accessing this field. The |
|
|
281 |
CLASS="STRUCTFIELD" |
|
|
282 |
> |
|
|
283 |
>clip_rect |
|
|
284 |
> |
|
|
285 |
> field |
|
|
286 |
is the clipping rectangle as set by |
|
|
287 |
|
|
|
288 |
HREF="sdlsetcliprect.html" |
|
|
289 |
> |
|
|
290 |
CLASS="FUNCTION" |
|
|
291 |
>SDL_SetClipRect |
|
|
292 |
> |
|
|
293 |
>. |
|
|
294 |
> |
|
|
295 |
>The following are supported in the |
|
|
296 |
|
|
|
297 |
CLASS="STRUCTFIELD" |
|
|
298 |
> |
|
|
299 |
>flags |
|
|
300 |
> |
|
|
301 |
> field. |
|
|
302 |
> |
|
|
303 |
CLASS="INFORMALTABLE" |
|
|
304 |
> |
|
|
305 |
NAME="AEN2896" |
|
|
306 |
> |
|
|
307 |
> |
|
|
308 |
> |
|
|
309 |
> |
|
|
510 |
> |
|
|
511 |
> |
|
|
512 |
> |
|
|
513 |
> |
|
|
514 |
> |
|
|
515 |
CLASS="REFSECT1" |
|
|
516 |
> |
|
|
517 |
NAME="AEN2959" |
|
|
518 |
> |
|
|
519 |
> |
|
|
520 |
>See Also |
|
|
521 |
> |
|
|
522 |
> |
|
|
523 |
HREF="sdlpixelformat.html" |
|
|
524 |
> |
|
|
525 |
CLASS="STRUCTNAME" |
|
|
526 |
>SDL_PixelFormat |
|
|
527 |
> |
|
|
528 |
> |
|
|
529 |
> |
|
|
530 |
> |
|
|
531 |
CLASS="NAVFOOTER" |
|
|
532 |
>
|
|
|
533 |
ALIGN="LEFT" |
|
|
534 |
WIDTH="100%"> |
|
|
586 |
> |
|
|
587 |
> |
|
|
588 |
> |
|
|
589 |
> |