Mercurial > sdl-ios-xcode
comparison docs/html/sdlblitsurface.html @ 55:55f1f1b3e27d
Added new docs for SDL 1.2.1
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Sun, 10 Jun 2001 19:31:57 +0000 |
parents | 74212992fb08 |
children | e5bc29de3f0a |
comparison
equal
deleted
inserted
replaced
54:028447a8a758 | 55:55f1f1b3e27d |
---|---|
2 ><HEAD | 2 ><HEAD |
3 ><TITLE | 3 ><TITLE |
4 >SDL_BlitSurface</TITLE | 4 >SDL_BlitSurface</TITLE |
5 ><META | 5 ><META |
6 NAME="GENERATOR" | 6 NAME="GENERATOR" |
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.61 | 7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64 |
8 "><LINK | 8 "><LINK |
9 REL="HOME" | 9 REL="HOME" |
10 TITLE="SDL Library Documentation" | 10 TITLE="SDL Library Documentation" |
11 HREF="index.html"><LINK | 11 HREF="index.html"><LINK |
12 REL="UP" | 12 REL="UP" |
71 >SDL_BlitSurface</A | 71 >SDL_BlitSurface</A |
72 ></H1 | 72 ></H1 |
73 ><DIV | 73 ><DIV |
74 CLASS="REFNAMEDIV" | 74 CLASS="REFNAMEDIV" |
75 ><A | 75 ><A |
76 NAME="AEN1806" | 76 NAME="AEN1883" |
77 ></A | 77 ></A |
78 ><H2 | 78 ><H2 |
79 >Name</H2 | 79 >Name</H2 |
80 >SDL_BlitSurface -- This performs a fast blit from the source surface to the destination surface.</DIV | 80 >SDL_BlitSurface -- This performs a fast blit from the source surface to the destination surface.</DIV |
81 ><DIV | 81 ><DIV |
82 CLASS="REFSYNOPSISDIV" | 82 CLASS="REFSYNOPSISDIV" |
83 ><A | 83 ><A |
84 NAME="AEN1809" | 84 NAME="AEN1886" |
85 ></A | 85 ></A |
86 ><H2 | 86 ><H2 |
87 >Synopsis</H2 | 87 >Synopsis</H2 |
88 ><DIV | 88 ><DIV |
89 CLASS="FUNCSYNOPSIS" | 89 CLASS="FUNCSYNOPSIS" |
90 ><A | 90 ><A |
91 NAME="AEN1810" | 91 NAME="AEN1887" |
92 ></A | 92 ></A |
93 ><P | 93 ><P |
94 ></P | 94 ></P |
95 ><PRE | 95 ><PRE |
96 CLASS="FUNCSYNOPSISINFO" | 96 CLASS="FUNCSYNOPSISINFO" |
110 ></DIV | 110 ></DIV |
111 ></DIV | 111 ></DIV |
112 ><DIV | 112 ><DIV |
113 CLASS="REFSECT1" | 113 CLASS="REFSECT1" |
114 ><A | 114 ><A |
115 NAME="AEN1816" | 115 NAME="AEN1893" |
116 ></A | 116 ></A |
117 ><H2 | 117 ><H2 |
118 >Description</H2 | 118 >Description</H2 |
119 ><P | 119 ><P |
120 >This performs a fast blit from the source surface to the destination surface.</P | 120 >This performs a fast blit from the source surface to the destination surface.</P |
168 >srcrect</I | 168 >srcrect</I |
169 ></TT | 169 ></TT |
170 > is not modified).</P | 170 > is not modified).</P |
171 ><P | 171 ><P |
172 >The blit function should not be called on a locked surface.</P | 172 >The blit function should not be called on a locked surface.</P |
173 ><DIV | 173 ><P |
174 CLASS="NOTE" | |
175 ><BLOCKQUOTE | |
176 CLASS="NOTE" | |
177 ><P | |
178 ><B | |
179 >Note: </B | |
180 >The results of blitting operations vary greatly depending on whether <TT | 174 >The results of blitting operations vary greatly depending on whether <TT |
181 CLASS="LITERAL" | 175 CLASS="LITERAL" |
182 >SDL_SRCAPLHA</TT | 176 >SDL_SRCAPLHA</TT |
183 > is set or not. See <A | 177 > is set or not. See <A |
184 HREF="sdlsetalpha.html" | 178 HREF="sdlsetalpha.html" |
185 >SDL_SetAlpha</A | 179 >SDL_SetAlpha</A |
186 >.</P | 180 > for an explaination of how this affects your results. Colorkeying and alpha attributes also interact with surface blitting, as the following pseudo-code should hopefully explain. |
187 ></BLOCKQUOTE | 181 <PRE |
188 ></DIV | 182 CLASS="PROGRAMLISTING" |
183 >if (source surface has SDL_SRCALPHA set) { | |
184 if (source surface has alpha channel (that is, format->Amask != 0)) | |
185 blit using per-pixel alpha, ignoring any colour key | |
186 else { | |
187 if (source surface has SDL_SRCCOLORKEY set) | |
188 blit using the colour key AND the per-surface alpha value | |
189 else | |
190 blit using the per-surface alpha value | |
191 } | |
192 } else { | |
193 if (source surface has SDL_SRCCOLORKEY set) | |
194 blit using the colour key | |
195 else | |
196 ordinary opaque rectangular blit | |
197 }</PRE | |
198 ></P | |
189 ></DIV | 199 ></DIV |
190 ><DIV | 200 ><DIV |
191 CLASS="REFSECT1" | 201 CLASS="REFSECT1" |
192 ><A | 202 ><A |
193 NAME="AEN1835" | 203 NAME="AEN1912" |
194 ></A | 204 ></A |
195 ><H2 | 205 ><H2 |
196 >Return Value</H2 | 206 >Return Value</H2 |
197 ><P | 207 ><P |
198 >If the blit is successful, it returns <SPAN | 208 >If the blit is successful, it returns <SPAN |
224 have access to the video memory again.</P | 234 have access to the video memory again.</P |
225 ></DIV | 235 ></DIV |
226 ><DIV | 236 ><DIV |
227 CLASS="REFSECT1" | 237 CLASS="REFSECT1" |
228 ><A | 238 ><A |
229 NAME="AEN1843" | 239 NAME="AEN1920" |
230 ></A | 240 ></A |
231 ><H2 | 241 ><H2 |
232 >See Also</H2 | 242 >See Also</H2 |
233 ><P | 243 ><P |
234 ><A | 244 ><A |