0
|
1 <HTML
|
|
2 ><HEAD
|
|
3 ><TITLE
|
|
4 >SDL_ConvertSurface</TITLE
|
|
5 ><META
|
|
6 NAME="GENERATOR"
|
|
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.61
|
|
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_GetClipRect"
|
|
17 HREF="sdlgetcliprect.html"><LINK
|
|
18 REL="NEXT"
|
|
19 TITLE="SDL_BlitSurface"
|
|
20 HREF="sdlblitsurface.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="sdlgetcliprect.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="sdlblitsurface.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="SDLCONVERTSURFACE"
|
|
71 >SDL_ConvertSurface</A
|
|
72 ></H1
|
|
73 ><DIV
|
|
74 CLASS="REFNAMEDIV"
|
|
75 ><A
|
|
76 NAME="AEN1766"
|
|
77 ></A
|
|
78 ><H2
|
|
79 >Name</H2
|
|
80 >SDL_ConvertSurface -- Converts a surface to the same format as another surface.</DIV
|
|
81 ><DIV
|
|
82 CLASS="REFSYNOPSISDIV"
|
|
83 ><A
|
|
84 NAME="AEN1769"
|
|
85 ></A
|
|
86 ><H2
|
|
87 >Synopsis</H2
|
|
88 ><DIV
|
|
89 CLASS="FUNCSYNOPSIS"
|
|
90 ><A
|
|
91 NAME="AEN1770"
|
|
92 ></A
|
|
93 ><P
|
|
94 ></P
|
|
95 ><PRE
|
|
96 CLASS="FUNCSYNOPSISINFO"
|
|
97 >#include "SDL.h"</PRE
|
|
98 ><P
|
|
99 ><CODE
|
|
100 ><CODE
|
|
101 CLASS="FUNCDEF"
|
|
102 >SDL_Surface *<B
|
|
103 CLASS="FSFUNC"
|
|
104 >SDL_ConvertSurface</B
|
|
105 ></CODE
|
|
106 >(SDL_Surface *src, SDL_PixelFormat *fmt, Uint32 flags);</CODE
|
|
107 ></P
|
|
108 ><P
|
|
109 ></P
|
|
110 ></DIV
|
|
111 ></DIV
|
|
112 ><DIV
|
|
113 CLASS="REFSECT1"
|
|
114 ><A
|
|
115 NAME="AEN1776"
|
|
116 ></A
|
|
117 ><H2
|
|
118 >Description</H2
|
|
119 ><P
|
|
120 >Creates a new surface of the specified format, and then copies and maps
|
|
121 the given surface to it. If this function fails, it returns
|
|
122 <TT
|
|
123 CLASS="LITERAL"
|
|
124 >NULL</TT
|
|
125 >.</P
|
|
126 ><P
|
|
127 >The <TT
|
|
128 CLASS="PARAMETER"
|
|
129 ><I
|
|
130 >flags</I
|
|
131 ></TT
|
|
132 > parameter is passed to
|
|
133 <A
|
|
134 HREF="sdlcreatergbsurface.html"
|
|
135 ><TT
|
|
136 CLASS="FUNCTION"
|
|
137 >SDL_CreateRGBSurface</TT
|
|
138 ></A
|
|
139 >
|
|
140 and has those semantics.</P
|
|
141 ><P
|
|
142 >This function is used internally by
|
|
143 <A
|
|
144 HREF="sdldisplayformat.html"
|
|
145 ><TT
|
|
146 CLASS="FUNCTION"
|
|
147 >SDL_DisplayFormat</TT
|
|
148 ></A
|
|
149 >.</P
|
|
150 ></DIV
|
|
151 ><DIV
|
|
152 CLASS="REFSECT1"
|
|
153 ><A
|
|
154 NAME="AEN1787"
|
|
155 ></A
|
|
156 ><H2
|
|
157 >Return Value</H2
|
|
158 ><P
|
|
159 >Returns either a pointer to the new surface, or
|
|
160 <TT
|
|
161 CLASS="LITERAL"
|
|
162 >NULL</TT
|
|
163 > on error.</P
|
|
164 ></DIV
|
|
165 ><DIV
|
|
166 CLASS="REFSECT1"
|
|
167 ><A
|
|
168 NAME="AEN1791"
|
|
169 ></A
|
|
170 ><H2
|
|
171 >See Also</H2
|
|
172 ><P
|
|
173 ><A
|
|
174 HREF="sdlcreatergbsurface.html"
|
|
175 ><TT
|
|
176 CLASS="FUNCTION"
|
|
177 >SDL_CreateRGBSurface</TT
|
|
178 ></A
|
|
179 >,
|
|
180 <A
|
|
181 HREF="sdldisplayformat.html"
|
|
182 ><TT
|
|
183 CLASS="FUNCTION"
|
|
184 >SDL_DisplayFormat</TT
|
|
185 ></A
|
|
186 >,
|
|
187 <A
|
|
188 HREF="sdlpixelformat.html"
|
|
189 ><SPAN
|
|
190 CLASS="STRUCTNAME"
|
|
191 >SDL_PixelFormat</SPAN
|
|
192 ></A
|
|
193 >,
|
|
194 <A
|
|
195 HREF="sdlsurface.html"
|
|
196 ><SPAN
|
|
197 CLASS="STRUCTNAME"
|
|
198 >SDL_Surface</SPAN
|
|
199 ></A
|
|
200 ></P
|
|
201 ></DIV
|
|
202 ><DIV
|
|
203 CLASS="NAVFOOTER"
|
|
204 ><HR
|
|
205 ALIGN="LEFT"
|
|
206 WIDTH="100%"><TABLE
|
|
207 WIDTH="100%"
|
|
208 BORDER="0"
|
|
209 CELLPADDING="0"
|
|
210 CELLSPACING="0"
|
|
211 ><TR
|
|
212 ><TD
|
|
213 WIDTH="33%"
|
|
214 ALIGN="left"
|
|
215 VALIGN="top"
|
|
216 ><A
|
|
217 HREF="sdlgetcliprect.html"
|
|
218 >Prev</A
|
|
219 ></TD
|
|
220 ><TD
|
|
221 WIDTH="34%"
|
|
222 ALIGN="center"
|
|
223 VALIGN="top"
|
|
224 ><A
|
|
225 HREF="index.html"
|
|
226 >Home</A
|
|
227 ></TD
|
|
228 ><TD
|
|
229 WIDTH="33%"
|
|
230 ALIGN="right"
|
|
231 VALIGN="top"
|
|
232 ><A
|
|
233 HREF="sdlblitsurface.html"
|
|
234 >Next</A
|
|
235 ></TD
|
|
236 ></TR
|
|
237 ><TR
|
|
238 ><TD
|
|
239 WIDTH="33%"
|
|
240 ALIGN="left"
|
|
241 VALIGN="top"
|
|
242 >SDL_GetClipRect</TD
|
|
243 ><TD
|
|
244 WIDTH="34%"
|
|
245 ALIGN="center"
|
|
246 VALIGN="top"
|
|
247 ><A
|
|
248 HREF="video.html"
|
|
249 >Up</A
|
|
250 ></TD
|
|
251 ><TD
|
|
252 WIDTH="33%"
|
|
253 ALIGN="right"
|
|
254 VALIGN="top"
|
|
255 >SDL_BlitSurface</TD
|
|
256 ></TR
|
|
257 ></TABLE
|
|
258 ></DIV
|
|
259 ></BODY
|
|
260 ></HTML
|
|
261 > |