Mercurial > sdl-ios-xcode
annotate docs/html/sdldisplayformatalpha.html @ 665:d27aab66c5d6
*** empty log message ***
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 06 Aug 2003 20:12:00 +0000 |
parents | e5bc29de3f0a |
children | 355632dca928 |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL_DisplayFormatAlpha</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_DisplayFormat" | |
17 HREF="sdldisplayformat.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="SDL_WarpMouse" | |
20 HREF="sdlwarpmouse.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="sdldisplayformat.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="sdlwarpmouse.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="SDLDISPLAYFORMATALPHA" | |
71 >SDL_DisplayFormatAlpha</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="AEN2048" |
0 | 77 ></A |
78 ><H2 | |
79 >Name</H2 | |
80 >SDL_DisplayFormatAlpha -- Convert a surface to the display format</DIV | |
81 ><DIV | |
82 CLASS="REFSYNOPSISDIV" | |
83 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
84 NAME="AEN2051" |
0 | 85 ></A |
86 ><H2 | |
87 >Synopsis</H2 | |
88 ><DIV | |
89 CLASS="FUNCSYNOPSIS" | |
90 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
91 NAME="AEN2052" |
0 | 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_DisplayFormatAlpha</B | |
105 ></CODE | |
106 >(SDL_Surface *surface);</CODE | |
107 ></P | |
108 ><P | |
109 ></P | |
110 ></DIV | |
111 ></DIV | |
112 ><DIV | |
113 CLASS="REFSECT1" | |
114 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
115 NAME="AEN2058" |
0 | 116 ></A |
117 ><H2 | |
118 >Description</H2 | |
119 ><P | |
120 >This function takes a surface and copies it to a new surface of the | |
121 pixel format and colors of the video framebuffer plus an alpha channel, | |
122 suitable for fast blitting onto the display surface. It calls | |
123 <A | |
124 HREF="sdlconvertsurface.html" | |
125 >SDL_ConvertSurface</A | |
126 ></P | |
127 ><P | |
128 >If you want to take advantage of hardware colorkey or alpha blit | |
129 acceleration, you should set the colorkey and alpha value before | |
130 calling this function.</P | |
55
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
131 ><P |
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
132 >This function can be used to convert a colourkey to an alpha channel, |
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
133 if the <TT |
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
134 CLASS="LITERAL" |
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
135 >SDL_SRCCOLORKEY</TT |
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
136 > flag is set on the surface. |
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
137 The generated surface will then be transparent (alpha=0) where the |
55f1f1b3e27d
Added new docs for SDL 1.2.1
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
138 pixels match the colourkey, and opaque (alpha=255) elsewhere.</P |
0 | 139 ></DIV |
140 ><DIV | |
141 CLASS="REFSECT1" | |
142 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
143 NAME="AEN2065" |
0 | 144 ></A |
145 ><H2 | |
146 >Return Value</H2 | |
147 ><P | |
148 >If the conversion fails or runs out of memory, it returns | |
149 <SPAN | |
150 CLASS="RETURNVALUE" | |
151 >NULL</SPAN | |
152 ></P | |
153 ></DIV | |
154 ><DIV | |
155 CLASS="REFSECT1" | |
156 ><A | |
181
e5bc29de3f0a
Updated from the SDL Documentation Project
Sam Lantinga <slouken@libsdl.org>
parents:
55
diff
changeset
|
157 NAME="AEN2069" |
0 | 158 ></A |
159 ><H2 | |
160 >See Also</H2 | |
161 ><P | |
162 ><A | |
163 HREF="sdlconvertsurface.html" | |
164 >SDL_ConvertSurface</A | |
165 >, | |
166 <A | |
167 HREF="sdlsetalpha.html" | |
168 >SDL_SetAlpha</A | |
169 >, | |
170 <A | |
171 HREF="sdlsetcolorkey.html" | |
172 >SDL_SetColorKey</A | |
173 >, | |
174 <A | |
175 HREF="sdldisplayformat.html" | |
176 >SDL_DisplayFormat</A | |
177 >, | |
178 <A | |
179 HREF="sdlsurface.html" | |
180 >SDL_Surface</A | |
181 ></P | |
182 ></DIV | |
183 ><DIV | |
184 CLASS="NAVFOOTER" | |
185 ><HR | |
186 ALIGN="LEFT" | |
187 WIDTH="100%"><TABLE | |
188 WIDTH="100%" | |
189 BORDER="0" | |
190 CELLPADDING="0" | |
191 CELLSPACING="0" | |
192 ><TR | |
193 ><TD | |
194 WIDTH="33%" | |
195 ALIGN="left" | |
196 VALIGN="top" | |
197 ><A | |
198 HREF="sdldisplayformat.html" | |
199 >Prev</A | |
200 ></TD | |
201 ><TD | |
202 WIDTH="34%" | |
203 ALIGN="center" | |
204 VALIGN="top" | |
205 ><A | |
206 HREF="index.html" | |
207 >Home</A | |
208 ></TD | |
209 ><TD | |
210 WIDTH="33%" | |
211 ALIGN="right" | |
212 VALIGN="top" | |
213 ><A | |
214 HREF="sdlwarpmouse.html" | |
215 >Next</A | |
216 ></TD | |
217 ></TR | |
218 ><TR | |
219 ><TD | |
220 WIDTH="33%" | |
221 ALIGN="left" | |
222 VALIGN="top" | |
223 >SDL_DisplayFormat</TD | |
224 ><TD | |
225 WIDTH="34%" | |
226 ALIGN="center" | |
227 VALIGN="top" | |
228 ><A | |
229 HREF="video.html" | |
230 >Up</A | |
231 ></TD | |
232 ><TD | |
233 WIDTH="33%" | |
234 ALIGN="right" | |
235 VALIGN="top" | |
236 >SDL_WarpMouse</TD | |
237 ></TR | |
238 ></TABLE | |
239 ></DIV | |
240 ></BODY | |
241 ></HTML | |
242 > |