version 2 showing authors affecting page license.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
SDL_Surface |
|
|
2 |
!!!SDL_Surface |
|
|
3 |
NAME |
|
|
4 |
STRUCTURE DEFINITION |
|
|
5 |
STRUCTURE DATA |
|
|
6 |
DESCRIPTION |
|
|
7 |
SEE ALSO |
|
|
8 |
---- |
|
|
9 |
!!NAME |
|
|
10 |
|
|
|
11 |
|
|
|
12 |
SDL_Surface- Graphical Surface Structure |
|
|
13 |
!!STRUCTURE DEFINITION |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
typedef struct SDL_Surface { |
|
|
17 |
Uint32 flags; /* Read-only */ |
|
|
18 |
SDL_!PixelFormat *format; /* Read-only */ |
|
|
19 |
int w, h; /* Read-only */ |
|
|
20 |
Uint16 pitch; /* Read-only */ |
|
|
21 |
void *pixels; /* Read-write */ |
|
|
22 |
int offset; /* Private */ |
|
|
23 |
/* Hardware-specific surface info */ |
|
|
24 |
struct private_hwdata *hwdata; |
|
|
25 |
/* clipping information */ |
|
|
26 |
SDL_Rect clip_rect; /* Read-only */ |
|
|
27 |
Uint32 unused1; /* for binary compatibility */ |
|
|
28 |
Uint32 unused2; /* for binary compatibility */ |
|
|
29 |
/* info for fast blit mapping to other surfaces */ |
|
|
30 |
struct SDL_!BlitMap *map; /* Private */ |
|
|
31 |
/* format version, bumped at every change to invalidate blit maps */ |
|
|
32 |
unsigned int format_version; /* Private */ |
|
|
33 |
/* Reference count -- used when freeing surface */ |
|
|
34 |
int refcount; /* Read-mostly */ |
|
|
35 |
} SDL_Surface; |
|
|
36 |
!!STRUCTURE DATA |
|
|
37 |
|
|
|
38 |
|
|
|
39 |
__flags__ Surface flags |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
__format__ Pixel ''format'' |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
__w, h__ Width and height of the surface |
|
|
46 |
|
|
|
47 |
|
|
|
48 |
__pitch__ Length of a surface scanline in |
|
|
49 |
bytes |
|
|
50 |
|
|
|
51 |
|
|
|
52 |
__pixels__ Pointer to the actual pixel data |
|
|
53 |
|
|
|
54 |
|
|
|
55 |
__clip_minx, clip_maxx__ |
|
|
56 |
|
|
|
57 |
|
|
|
58 |
X clip coords |
|
|
59 |
|
|
|
60 |
|
|
|
61 |
__clip_rect__ surface clip ''rectangle'' |
|
|
62 |
!!DESCRIPTION |
|
|
63 |
|
|
|
64 |
|
|
|
65 |
__SDL_Surface__'s represent areas of |
|
|
66 |
__SDL_Surface__ by |
|
|
67 |
__SDL_!SetVideoMode__ and __SDL_!GetVideoSurface__. Most |
|
|
68 |
of the fields should be pretty obvious. __w__ and |
|
|
69 |
__h__ are the width and height of the surface in pixels. |
|
|
70 |
__pixels__ is a pointer to the actual pixel data, the |
|
|
71 |
surface should be ''locked'' before accessing this field. |
|
|
72 |
The __clip_rect__ field is the clipping rectangle as set |
|
|
73 |
by __SDL_!SetClipRect__. |
|
|
74 |
|
|
|
75 |
|
|
|
76 |
The following are supported in the __flags__ |
|
|
77 |
field. |
|
|
78 |
|
|
|
79 |
|
|
|
80 |
__SDL_SWSURFACE__ |
|
|
81 |
|
|
|
82 |
|
|
|
83 |
Surface is stored in system memory |
|
|
84 |
|
|
|
85 |
|
|
|
86 |
__SDL_HWSURFACE__ |
|
|
87 |
|
|
|
88 |
|
|
|
89 |
Surface is stored in video memory |
|
|
90 |
|
|
|
91 |
|
|
|
92 |
__SDL_ASYNCBLIT__ |
|
|
93 |
|
|
|
94 |
|
|
|
95 |
Surface uses asynchronous blits if possible |
|
|
96 |
|
|
|
97 |
|
|
|
98 |
__SDL_ANYFORMAT__ |
|
|
99 |
|
|
|
100 |
|
|
|
101 |
Allows any pixel-format (Display surface) |
|
|
102 |
|
|
|
103 |
|
|
|
104 |
__SDL_HWPALETTE__ |
|
|
105 |
|
|
|
106 |
|
|
|
107 |
Surface has exclusive palette |
|
|
108 |
|
|
|
109 |
|
|
|
110 |
__SDL_DOUBLEBUF__ |
|
|
111 |
|
|
|
112 |
|
|
|
113 |
Surface is double buffered (Display surface) |
|
|
114 |
|
|
|
115 |
|
|
|
116 |
__SDL_FULLSCREEN__ |
|
|
117 |
|
|
|
118 |
|
|
|
119 |
Surface is full screen (Display Surface) |
|
|
120 |
|
|
|
121 |
|
|
|
122 |
__SDL_OPENGL__ Surface has an OpenGL context (Display |
|
|
123 |
Surface) |
|
|
124 |
|
|
|
125 |
|
|
|
126 |
__SDL_OPENGLBLIT__ |
|
|
127 |
|
|
|
128 |
|
|
|
129 |
Surface supports OpenGL blitting (Display |
|
|
130 |
Surface) |
|
|
131 |
|
|
|
132 |
|
|
|
133 |
__SDL_RESIZABLE__ |
|
|
134 |
|
|
|
135 |
|
|
|
136 |
Surface is resizable (Display Surface) |
|
|
137 |
|
|
|
138 |
|
|
|
139 |
__SDL_HWACCEL__ Surface blit uses hardware |
|
|
140 |
acceleration |
|
|
141 |
|
|
|
142 |
|
|
|
143 |
__SDL_SRCOLORKEY__ |
|
|
144 |
|
|
|
145 |
|
|
|
146 |
Surface use colorkey blitting |
|
|
147 |
|
|
|
148 |
|
|
|
149 |
__SDL_RLEACCEL__ Colorkey blitting is accelerated with |
|
|
150 |
RLE |
|
|
151 |
|
|
|
152 |
|
|
|
153 |
__SDL_SRCALPHA__ Surface blit uses alpha |
|
|
154 |
blending |
|
|
155 |
|
|
|
156 |
|
|
|
157 |
__SDL_PREALLOC__ Surface uses preallocated |
|
|
158 |
memory |
|
|
159 |
!!SEE ALSO |
|
|
160 |
|
|
|
161 |
|
|
|
162 |
__SDL_!PixelFormat__ |
|
|
163 |
---- |