1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<head>
4<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6<title>SDL_gfx: I:/Sources/sdlgfx/SDL_rotozoom.h File Reference</title>
7
8<link href="tabs.css" rel="stylesheet" type="text/css"/>
9<link href="doxygen.css" rel="stylesheet" type="text/css" />
10
11
12
13</head>
14<body>
15<div id="top"><!-- do not remove this div! -->
16
17
18<div id="titlearea">
19<table cellspacing="0" cellpadding="0">
20 <tbody>
21 <tr style="height: 56px;">
22
23
24  <td style="padding-left: 0.5em;">
25   <div id="projectname">SDL_gfx
26   &#160;<span id="projectnumber">2.0.25</span>
27   </div>
28
29  </td>
30
31
32
33 </tr>
34 </tbody>
35</table>
36</div>
37
38<!-- Generated by Doxygen 1.8.0 -->
39  <div id="navrow1" class="tabs">
40    <ul class="tablist">
41      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
42      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
43      <li class="current"><a href="files.html"><span>Files</span></a></li>
44    </ul>
45  </div>
46  <div id="navrow2" class="tabs2">
47    <ul class="tablist">
48      <li><a href="files.html"><span>File&#160;List</span></a></li>
49      <li><a href="globals.html"><span>Globals</span></a></li>
50    </ul>
51  </div>
52</div>
53<div class="header">
54  <div class="summary">
55<a href="#define-members">Defines</a> &#124;
56<a href="#func-members">Functions</a>  </div>
57  <div class="headertitle">
58<div class="title">I:/Sources/sdlgfx/SDL_rotozoom.h File Reference</div>  </div>
59</div><!--header-->
60<div class="contents">
61<div class="textblock"><code>#include &lt;math.h&gt;</code><br/>
62<code>#include &quot;SDL.h&quot;</code><br/>
63</div>
64<p><a href="_s_d_l__rotozoom_8h_source.html">Go to the source code of this file.</a></p>
65<table class="memberdecls">
66<tr><td colspan="2"><h2><a name="define-members"></a>
67Defines</h2></td></tr>
68<tr class="memitem:ae71449b1cc6e6250b91f539153a7a0d3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8h.html#ae71449b1cc6e6250b91f539153a7a0d3">M_PI</a>&#160;&#160;&#160;3.141592654</td></tr>
69<tr class="memitem:a6541cd06edcce77d8a6f1c6350c988af"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8h.html#a6541cd06edcce77d8a6f1c6350c988af">SMOOTHING_OFF</a>&#160;&#160;&#160;0</td></tr>
70<tr class="memdesc:a6541cd06edcce77d8a6f1c6350c988af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable anti-aliasing (no smoothing).  <a href="#a6541cd06edcce77d8a6f1c6350c988af"></a><br/></td></tr>
71<tr class="memitem:abeb6ae7618fcb315d0399fe65849a2e8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8h.html#abeb6ae7618fcb315d0399fe65849a2e8">SMOOTHING_ON</a>&#160;&#160;&#160;1</td></tr>
72<tr class="memdesc:abeb6ae7618fcb315d0399fe65849a2e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable anti-aliasing (smoothing).  <a href="#abeb6ae7618fcb315d0399fe65849a2e8"></a><br/></td></tr>
73<tr class="memitem:a5115250bd769f389e278cd5adfb63179"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a>&#160;&#160;&#160;extern</td></tr>
74<tr><td colspan="2"><h2><a name="func-members"></a>
75Functions</h2></td></tr>
76<tr class="memitem:a3cb0c11d5edc929579c807dc7612348c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8h.html#a3cb0c11d5edc929579c807dc7612348c">rotozoomSurface</a> (SDL_Surface *src, double angle, double zoom, int smooth)</td></tr>
77<tr class="memdesc:a3cb0c11d5edc929579c807dc7612348c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotates and zooms a surface and optional anti-aliasing.  <a href="#a3cb0c11d5edc929579c807dc7612348c"></a><br/></td></tr>
78<tr class="memitem:a454d4234a45eab6ec238a40cc44051d4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8h.html#a454d4234a45eab6ec238a40cc44051d4">rotozoomSurfaceXY</a> (SDL_Surface *src, double angle, double zoomx, double zoomy, int smooth)</td></tr>
79<tr class="memdesc:a454d4234a45eab6ec238a40cc44051d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing.  <a href="#a454d4234a45eab6ec238a40cc44051d4"></a><br/></td></tr>
80<tr class="memitem:a3ca2316375d6faf4f19b26c2f1f14bbc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8h.html#a3ca2316375d6faf4f19b26c2f1f14bbc">rotozoomSurfaceSize</a> (int width, int height, double angle, double zoom, int *dstwidth, int *dstheight)</td></tr>
81<tr class="memdesc:a3ca2316375d6faf4f19b26c2f1f14bbc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of the resulting target surface for a <a class="el" href="_s_d_l__rotozoom_8c.html#a5f64ed53eeee5f2667971c857698d1e5" title="Rotates and zooms a surface and optional anti-aliasing.">rotozoomSurface()</a> call.  <a href="#a3ca2316375d6faf4f19b26c2f1f14bbc"></a><br/></td></tr>
82<tr class="memitem:a612334fa642f672af953f544da6245d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8h.html#a612334fa642f672af953f544da6245d0">rotozoomSurfaceSizeXY</a> (int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight)</td></tr>
83<tr class="memdesc:a612334fa642f672af953f544da6245d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the size of the resulting target surface for a <a class="el" href="_s_d_l__rotozoom_8c.html#aab98b5b0da4ea468bacf47f7b85f0ee2" title="Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-...">rotozoomSurfaceXY()</a> call.  <a href="#a612334fa642f672af953f544da6245d0"></a><br/></td></tr>
84<tr class="memitem:a06c8108f8fe8de77cf841c176ee64850"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8h.html#a06c8108f8fe8de77cf841c176ee64850">zoomSurface</a> (SDL_Surface *src, double zoomx, double zoomy, int smooth)</td></tr>
85<tr class="memdesc:a06c8108f8fe8de77cf841c176ee64850"><td class="mdescLeft">&#160;</td><td class="mdescRight">Zoom a surface by independent horizontal and vertical factors with optional smoothing.  <a href="#a06c8108f8fe8de77cf841c176ee64850"></a><br/></td></tr>
86<tr class="memitem:a7927e415d87ea7856794cd4cc77e0a25"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8h.html#a7927e415d87ea7856794cd4cc77e0a25">zoomSurfaceSize</a> (int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight)</td></tr>
87<tr class="memdesc:a7927e415d87ea7856794cd4cc77e0a25"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates the size of the target surface for a <a class="el" href="_s_d_l__rotozoom_8c.html#abdd772b2f6b1f26134e4e90cda657a21" title="Zoom a surface by independent horizontal and vertical factors with optional smoothing.">zoomSurface()</a> call.  <a href="#a7927e415d87ea7856794cd4cc77e0a25"></a><br/></td></tr>
88<tr class="memitem:a7a7ac2cc0d79d282b5a4c76143b7e7a9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8h.html#a7a7ac2cc0d79d282b5a4c76143b7e7a9">shrinkSurface</a> (SDL_Surface *src, int factorx, int factory)</td></tr>
89<tr class="memdesc:a7a7ac2cc0d79d282b5a4c76143b7e7a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shrink a surface by an integer ratio using averaging.  <a href="#a7a7ac2cc0d79d282b5a4c76143b7e7a9"></a><br/></td></tr>
90<tr class="memitem:ac06e9fa4fce6a1dbae45462529be581e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> SDL_Surface *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8h.html#ac06e9fa4fce6a1dbae45462529be581e">rotateSurface90Degrees</a> (SDL_Surface *src, int numClockwiseTurns)</td></tr>
91<tr class="memdesc:ac06e9fa4fce6a1dbae45462529be581e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Rotates a 32 bit surface in increments of 90 degrees.  <a href="#ac06e9fa4fce6a1dbae45462529be581e"></a><br/></td></tr>
92</table>
93<hr/><h2>Define Documentation</h2>
94<a class="anchor" id="ae71449b1cc6e6250b91f539153a7a0d3"></a>
95<div class="memitem">
96<div class="memproto">
97      <table class="memname">
98        <tr>
99          <td class="memname">#define <a class="el" href="_s_d_l__rotozoom_8h.html#ae71449b1cc6e6250b91f539153a7a0d3">M_PI</a>&#160;&#160;&#160;3.141592654</td>
100        </tr>
101      </table>
102</div>
103<div class="memdoc">
104
105<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8h_source.html#l00041">41</a> of file <a class="el" href="_s_d_l__rotozoom_8h_source.html">SDL_rotozoom.h</a>.</p>
106
107</div>
108</div>
109<a class="anchor" id="a5115250bd769f389e278cd5adfb63179"></a>
110<div class="memitem">
111<div class="memproto">
112      <table class="memname">
113        <tr>
114          <td class="memname">#define <a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a>&#160;&#160;&#160;extern</td>
115        </tr>
116      </table>
117</div>
118<div class="memdoc">
119
120<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8h_source.html#l00070">70</a> of file <a class="el" href="_s_d_l__rotozoom_8h_source.html">SDL_rotozoom.h</a>.</p>
121
122</div>
123</div>
124<a class="anchor" id="a6541cd06edcce77d8a6f1c6350c988af"></a>
125<div class="memitem">
126<div class="memproto">
127      <table class="memname">
128        <tr>
129          <td class="memname">#define <a class="el" href="_s_d_l__rotozoom_8h.html#a6541cd06edcce77d8a6f1c6350c988af">SMOOTHING_OFF</a>&#160;&#160;&#160;0</td>
130        </tr>
131      </table>
132</div>
133<div class="memdoc">
134
135<p>Disable anti-aliasing (no smoothing). </p>
136
137<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8h_source.html#l00051">51</a> of file <a class="el" href="_s_d_l__rotozoom_8h_source.html">SDL_rotozoom.h</a>.</p>
138
139</div>
140</div>
141<a class="anchor" id="abeb6ae7618fcb315d0399fe65849a2e8"></a>
142<div class="memitem">
143<div class="memproto">
144      <table class="memname">
145        <tr>
146          <td class="memname">#define <a class="el" href="_s_d_l__rotozoom_8h.html#abeb6ae7618fcb315d0399fe65849a2e8">SMOOTHING_ON</a>&#160;&#160;&#160;1</td>
147        </tr>
148      </table>
149</div>
150<div class="memdoc">
151
152<p>Enable anti-aliasing (smoothing). </p>
153
154<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8h_source.html#l00056">56</a> of file <a class="el" href="_s_d_l__rotozoom_8h_source.html">SDL_rotozoom.h</a>.</p>
155
156</div>
157</div>
158<hr/><h2>Function Documentation</h2>
159<a class="anchor" id="ac06e9fa4fce6a1dbae45462529be581e"></a>
160<div class="memitem">
161<div class="memproto">
162      <table class="memname">
163        <tr>
164          <td class="memname"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#ac06e9fa4fce6a1dbae45462529be581e">rotateSurface90Degrees</a> </td>
165          <td>(</td>
166          <td class="paramtype">SDL_Surface *&#160;</td>
167          <td class="paramname"><em>src</em>, </td>
168        </tr>
169        <tr>
170          <td class="paramkey"></td>
171          <td></td>
172          <td class="paramtype">int&#160;</td>
173          <td class="paramname"><em>numClockwiseTurns</em>&#160;</td>
174        </tr>
175        <tr>
176          <td></td>
177          <td>)</td>
178          <td></td><td></td>
179        </tr>
180      </table>
181</div>
182<div class="memdoc">
183
184<p>Rotates a 32 bit surface in increments of 90 degrees. </p>
185<p>Specialized 90 degree rotator which rotates a 'src' surface in 90 degree increments clockwise returning a new surface. Faster than rotozoomer since not scanning or interpolation takes place. Input surface must be 32 bit. (code contributed by J. Schiller, improved by C. Allport and A. Schiffler)</p>
186<dl class="params"><dt><b>Parameters:</b></dt><dd>
187  <table class="params">
188    <tr><td class="paramname">src</td><td>Source surface to rotate. </td></tr>
189    <tr><td class="paramname">numClockwiseTurns</td><td>Number of clockwise 90 degree turns to apply to the source.</td></tr>
190  </table>
191  </dd>
192</dl>
193<dl class="section return"><dt>Returns:</dt><dd>The new, rotated surface; or NULL for surfaces with incorrect input format. </dd></dl>
194
195<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00814">814</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>
196
197</div>
198</div>
199<a class="anchor" id="a3cb0c11d5edc929579c807dc7612348c"></a>
200<div class="memitem">
201<div class="memproto">
202      <table class="memname">
203        <tr>
204          <td class="memname"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#a3cb0c11d5edc929579c807dc7612348c">rotozoomSurface</a> </td>
205          <td>(</td>
206          <td class="paramtype">SDL_Surface *&#160;</td>
207          <td class="paramname"><em>src</em>, </td>
208        </tr>
209        <tr>
210          <td class="paramkey"></td>
211          <td></td>
212          <td class="paramtype">double&#160;</td>
213          <td class="paramname"><em>angle</em>, </td>
214        </tr>
215        <tr>
216          <td class="paramkey"></td>
217          <td></td>
218          <td class="paramtype">double&#160;</td>
219          <td class="paramname"><em>zoom</em>, </td>
220        </tr>
221        <tr>
222          <td class="paramkey"></td>
223          <td></td>
224          <td class="paramtype">int&#160;</td>
225          <td class="paramname"><em>smooth</em>&#160;</td>
226        </tr>
227        <tr>
228          <td></td>
229          <td>)</td>
230          <td></td><td></td>
231        </tr>
232      </table>
233</div>
234<div class="memdoc">
235
236<p>Rotates and zooms a surface and optional anti-aliasing. </p>
237<p>Rotates and zoomes a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees and 'zoom' a scaling factor. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.</p>
238<dl class="params"><dt><b>Parameters:</b></dt><dd>
239  <table class="params">
240    <tr><td class="paramname">src</td><td>The surface to rotozoom. </td></tr>
241    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
242    <tr><td class="paramname">zoom</td><td>The scaling factor. </td></tr>
243    <tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
244  </table>
245  </dd>
246</dl>
247<dl class="section return"><dt>Returns:</dt><dd>The new rotozoomed surface. </dd></dl>
248
249<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01030">1030</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>
250
251</div>
252</div>
253<a class="anchor" id="a3ca2316375d6faf4f19b26c2f1f14bbc"></a>
254<div class="memitem">
255<div class="memproto">
256      <table class="memname">
257        <tr>
258          <td class="memname"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> void <a class="el" href="_s_d_l__rotozoom_8h.html#a3ca2316375d6faf4f19b26c2f1f14bbc">rotozoomSurfaceSize</a> </td>
259          <td>(</td>
260          <td class="paramtype">int&#160;</td>
261          <td class="paramname"><em>width</em>, </td>
262        </tr>
263        <tr>
264          <td class="paramkey"></td>
265          <td></td>
266          <td class="paramtype">int&#160;</td>
267          <td class="paramname"><em>height</em>, </td>
268        </tr>
269        <tr>
270          <td class="paramkey"></td>
271          <td></td>
272          <td class="paramtype">double&#160;</td>
273          <td class="paramname"><em>angle</em>, </td>
274        </tr>
275        <tr>
276          <td class="paramkey"></td>
277          <td></td>
278          <td class="paramtype">double&#160;</td>
279          <td class="paramname"><em>zoom</em>, </td>
280        </tr>
281        <tr>
282          <td class="paramkey"></td>
283          <td></td>
284          <td class="paramtype">int *&#160;</td>
285          <td class="paramname"><em>dstwidth</em>, </td>
286        </tr>
287        <tr>
288          <td class="paramkey"></td>
289          <td></td>
290          <td class="paramtype">int *&#160;</td>
291          <td class="paramname"><em>dstheight</em>&#160;</td>
292        </tr>
293        <tr>
294          <td></td>
295          <td>)</td>
296          <td></td><td></td>
297        </tr>
298      </table>
299</div>
300<div class="memdoc">
301
302<p>Returns the size of the resulting target surface for a <a class="el" href="_s_d_l__rotozoom_8c.html#a5f64ed53eeee5f2667971c857698d1e5" title="Rotates and zooms a surface and optional anti-aliasing.">rotozoomSurface()</a> call. </p>
303<dl class="params"><dt><b>Parameters:</b></dt><dd>
304  <table class="params">
305    <tr><td class="paramname">width</td><td>The source surface width. </td></tr>
306    <tr><td class="paramname">height</td><td>The source surface height. </td></tr>
307    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
308    <tr><td class="paramname">zoom</td><td>The scaling factor. </td></tr>
309    <tr><td class="paramname">dstwidth</td><td>The calculated width of the rotozoomed destination surface. </td></tr>
310    <tr><td class="paramname">dstheight</td><td>The calculated height of the rotozoomed destination surface. </td></tr>
311  </table>
312  </dd>
313</dl>
314
315<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01008">1008</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>
316
317</div>
318</div>
319<a class="anchor" id="a612334fa642f672af953f544da6245d0"></a>
320<div class="memitem">
321<div class="memproto">
322      <table class="memname">
323        <tr>
324          <td class="memname"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> void <a class="el" href="_s_d_l__rotozoom_8h.html#a612334fa642f672af953f544da6245d0">rotozoomSurfaceSizeXY</a> </td>
325          <td>(</td>
326          <td class="paramtype">int&#160;</td>
327          <td class="paramname"><em>width</em>, </td>
328        </tr>
329        <tr>
330          <td class="paramkey"></td>
331          <td></td>
332          <td class="paramtype">int&#160;</td>
333          <td class="paramname"><em>height</em>, </td>
334        </tr>
335        <tr>
336          <td class="paramkey"></td>
337          <td></td>
338          <td class="paramtype">double&#160;</td>
339          <td class="paramname"><em>angle</em>, </td>
340        </tr>
341        <tr>
342          <td class="paramkey"></td>
343          <td></td>
344          <td class="paramtype">double&#160;</td>
345          <td class="paramname"><em>zoomx</em>, </td>
346        </tr>
347        <tr>
348          <td class="paramkey"></td>
349          <td></td>
350          <td class="paramtype">double&#160;</td>
351          <td class="paramname"><em>zoomy</em>, </td>
352        </tr>
353        <tr>
354          <td class="paramkey"></td>
355          <td></td>
356          <td class="paramtype">int *&#160;</td>
357          <td class="paramname"><em>dstwidth</em>, </td>
358        </tr>
359        <tr>
360          <td class="paramkey"></td>
361          <td></td>
362          <td class="paramtype">int *&#160;</td>
363          <td class="paramname"><em>dstheight</em>&#160;</td>
364        </tr>
365        <tr>
366          <td></td>
367          <td>)</td>
368          <td></td><td></td>
369        </tr>
370      </table>
371</div>
372<div class="memdoc">
373
374<p>Returns the size of the resulting target surface for a <a class="el" href="_s_d_l__rotozoom_8c.html#aab98b5b0da4ea468bacf47f7b85f0ee2" title="Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-...">rotozoomSurfaceXY()</a> call. </p>
375<dl class="params"><dt><b>Parameters:</b></dt><dd>
376  <table class="params">
377    <tr><td class="paramname">width</td><td>The source surface width. </td></tr>
378    <tr><td class="paramname">height</td><td>The source surface height. </td></tr>
379    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
380    <tr><td class="paramname">zoomx</td><td>The horizontal scaling factor. </td></tr>
381    <tr><td class="paramname">zoomy</td><td>The vertical scaling factor. </td></tr>
382    <tr><td class="paramname">dstwidth</td><td>The calculated width of the rotozoomed destination surface. </td></tr>
383    <tr><td class="paramname">dstheight</td><td>The calculated height of the rotozoomed destination surface. </td></tr>
384  </table>
385  </dd>
386</dl>
387
388<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00991">991</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>
389
390</div>
391</div>
392<a class="anchor" id="a454d4234a45eab6ec238a40cc44051d4"></a>
393<div class="memitem">
394<div class="memproto">
395      <table class="memname">
396        <tr>
397          <td class="memname"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#a454d4234a45eab6ec238a40cc44051d4">rotozoomSurfaceXY</a> </td>
398          <td>(</td>
399          <td class="paramtype">SDL_Surface *&#160;</td>
400          <td class="paramname"><em>src</em>, </td>
401        </tr>
402        <tr>
403          <td class="paramkey"></td>
404          <td></td>
405          <td class="paramtype">double&#160;</td>
406          <td class="paramname"><em>angle</em>, </td>
407        </tr>
408        <tr>
409          <td class="paramkey"></td>
410          <td></td>
411          <td class="paramtype">double&#160;</td>
412          <td class="paramname"><em>zoomx</em>, </td>
413        </tr>
414        <tr>
415          <td class="paramkey"></td>
416          <td></td>
417          <td class="paramtype">double&#160;</td>
418          <td class="paramname"><em>zoomy</em>, </td>
419        </tr>
420        <tr>
421          <td class="paramkey"></td>
422          <td></td>
423          <td class="paramtype">int&#160;</td>
424          <td class="paramname"><em>smooth</em>&#160;</td>
425        </tr>
426        <tr>
427          <td></td>
428          <td>)</td>
429          <td></td><td></td>
430        </tr>
431      </table>
432</div>
433<div class="memdoc">
434
435<p>Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing. </p>
436<p>Rotates and zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'angle' is the rotation in degrees, 'zoomx and 'zoomy' scaling factors. If 'smooth' is set then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly.</p>
437<dl class="params"><dt><b>Parameters:</b></dt><dd>
438  <table class="params">
439    <tr><td class="paramname">src</td><td>The surface to rotozoom. </td></tr>
440    <tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr>
441    <tr><td class="paramname">zoomx</td><td>The horizontal scaling factor. </td></tr>
442    <tr><td class="paramname">zoomy</td><td>The vertical scaling factor. </td></tr>
443    <tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
444  </table>
445  </dd>
446</dl>
447<dl class="section return"><dt>Returns:</dt><dd>The new rotozoomed surface. </dd></dl>
448
449<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01051">1051</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>
450
451</div>
452</div>
453<a class="anchor" id="a7a7ac2cc0d79d282b5a4c76143b7e7a9"></a>
454<div class="memitem">
455<div class="memproto">
456      <table class="memname">
457        <tr>
458          <td class="memname"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#a7a7ac2cc0d79d282b5a4c76143b7e7a9">shrinkSurface</a> </td>
459          <td>(</td>
460          <td class="paramtype">SDL_Surface *&#160;</td>
461          <td class="paramname"><em>src</em>, </td>
462        </tr>
463        <tr>
464          <td class="paramkey"></td>
465          <td></td>
466          <td class="paramtype">int&#160;</td>
467          <td class="paramname"><em>factorx</em>, </td>
468        </tr>
469        <tr>
470          <td class="paramkey"></td>
471          <td></td>
472          <td class="paramtype">int&#160;</td>
473          <td class="paramname"><em>factory</em>&#160;</td>
474        </tr>
475        <tr>
476          <td></td>
477          <td>)</td>
478          <td></td><td></td>
479        </tr>
480      </table>
481</div>
482<div class="memdoc">
483
484<p>Shrink a surface by an integer ratio using averaging. </p>
485<p>Shrinks a 32bit or 8bit 'src' surface to a newly created 'dst' surface. 'factorx' and 'factory' are the shrinking ratios (i.e. 2=1/2 the size, 3=1/3 the size, etc.) The destination surface is antialiased by averaging the source box RGBA or Y information. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. The input surface is not modified. The output surface is newly allocated.</p>
486<dl class="params"><dt><b>Parameters:</b></dt><dd>
487  <table class="params">
488    <tr><td class="paramname">src</td><td>The surface to shrink. </td></tr>
489    <tr><td class="paramname">factorx</td><td>The horizontal shrinking ratio. </td></tr>
490    <tr><td class="paramname">factory</td><td>The vertical shrinking ratio.</td></tr>
491  </table>
492  </dd>
493</dl>
494<dl class="section return"><dt>Returns:</dt><dd>The new, shrunken surface. </dd></dl>
495
496<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01548">1548</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>
497
498</div>
499</div>
500<a class="anchor" id="a06c8108f8fe8de77cf841c176ee64850"></a>
501<div class="memitem">
502<div class="memproto">
503      <table class="memname">
504        <tr>
505          <td class="memname"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#a06c8108f8fe8de77cf841c176ee64850">zoomSurface</a> </td>
506          <td>(</td>
507          <td class="paramtype">SDL_Surface *&#160;</td>
508          <td class="paramname"><em>src</em>, </td>
509        </tr>
510        <tr>
511          <td class="paramkey"></td>
512          <td></td>
513          <td class="paramtype">double&#160;</td>
514          <td class="paramname"><em>zoomx</em>, </td>
515        </tr>
516        <tr>
517          <td class="paramkey"></td>
518          <td></td>
519          <td class="paramtype">double&#160;</td>
520          <td class="paramname"><em>zoomy</em>, </td>
521        </tr>
522        <tr>
523          <td class="paramkey"></td>
524          <td></td>
525          <td class="paramtype">int&#160;</td>
526          <td class="paramname"><em>smooth</em>&#160;</td>
527        </tr>
528        <tr>
529          <td></td>
530          <td>)</td>
531          <td></td><td></td>
532        </tr>
533      </table>
534</div>
535<div class="memdoc">
536
537<p>Zoom a surface by independent horizontal and vertical factors with optional smoothing. </p>
538<p>Zooms a 32bit or 8bit 'src' surface to newly created 'dst' surface. 'zoomx' and 'zoomy' are scaling factors for width and height. If 'smooth' is on then the destination 32bit surface is anti-aliased. If the surface is not 8bit or 32bit RGBA/ABGR it will be converted into a 32bit RGBA format on the fly. If zoom factors are negative, the image is flipped on the axes.</p>
539<dl class="params"><dt><b>Parameters:</b></dt><dd>
540  <table class="params">
541    <tr><td class="paramname">src</td><td>The surface to zoom. </td></tr>
542    <tr><td class="paramname">zoomx</td><td>The horizontal zoom factor. </td></tr>
543    <tr><td class="paramname">zoomy</td><td>The vertical zoom factor. </td></tr>
544    <tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
545  </table>
546  </dd>
547</dl>
548<dl class="section return"><dt>Returns:</dt><dd>The new, zoomed surface. </dd></dl>
549
550<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01392">1392</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>
551
552</div>
553</div>
554<a class="anchor" id="a7927e415d87ea7856794cd4cc77e0a25"></a>
555<div class="memitem">
556<div class="memproto">
557      <table class="memname">
558        <tr>
559          <td class="memname"><a class="el" href="_s_d_l__rotozoom_8h.html#a5115250bd769f389e278cd5adfb63179">SDL_ROTOZOOM_SCOPE</a> void <a class="el" href="_s_d_l__rotozoom_8h.html#a7927e415d87ea7856794cd4cc77e0a25">zoomSurfaceSize</a> </td>
560          <td>(</td>
561          <td class="paramtype">int&#160;</td>
562          <td class="paramname"><em>width</em>, </td>
563        </tr>
564        <tr>
565          <td class="paramkey"></td>
566          <td></td>
567          <td class="paramtype">int&#160;</td>
568          <td class="paramname"><em>height</em>, </td>
569        </tr>
570        <tr>
571          <td class="paramkey"></td>
572          <td></td>
573          <td class="paramtype">double&#160;</td>
574          <td class="paramname"><em>zoomx</em>, </td>
575        </tr>
576        <tr>
577          <td class="paramkey"></td>
578          <td></td>
579          <td class="paramtype">double&#160;</td>
580          <td class="paramname"><em>zoomy</em>, </td>
581        </tr>
582        <tr>
583          <td class="paramkey"></td>
584          <td></td>
585          <td class="paramtype">int *&#160;</td>
586          <td class="paramname"><em>dstwidth</em>, </td>
587        </tr>
588        <tr>
589          <td class="paramkey"></td>
590          <td></td>
591          <td class="paramtype">int *&#160;</td>
592          <td class="paramname"><em>dstheight</em>&#160;</td>
593        </tr>
594        <tr>
595          <td></td>
596          <td>)</td>
597          <td></td><td></td>
598        </tr>
599      </table>
600</div>
601<div class="memdoc">
602
603<p>Calculates the size of the target surface for a <a class="el" href="_s_d_l__rotozoom_8c.html#abdd772b2f6b1f26134e4e90cda657a21" title="Zoom a surface by independent horizontal and vertical factors with optional smoothing.">zoomSurface()</a> call. </p>
604<p>The minimum size of the target surface is 1. The input factors can be positive or negative.</p>
605<dl class="params"><dt><b>Parameters:</b></dt><dd>
606  <table class="params">
607    <tr><td class="paramname">width</td><td>The width of the source surface to zoom. </td></tr>
608    <tr><td class="paramname">height</td><td>The height of the source surface to zoom. </td></tr>
609    <tr><td class="paramname">zoomx</td><td>The horizontal zoom factor. </td></tr>
610    <tr><td class="paramname">zoomy</td><td>The vertical zoom factor. </td></tr>
611    <tr><td class="paramname">dstwidth</td><td>Pointer to an integer to store the calculated width of the zoomed target surface. </td></tr>
612    <tr><td class="paramname">dstheight</td><td>Pointer to an integer to store the calculated height of the zoomed target surface. </td></tr>
613  </table>
614  </dd>
615</dl>
616
617<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01342">1342</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>
618
619</div>
620</div>
621</div><!-- contents -->
622
623
624<hr class="footer"/><address class="footer"><small>
625Generated by &#160;<a href="http://www.doxygen.org/index.html">
626<img class="footer" src="doxygen.png" alt="doxygen"/>
627</a> 1.8.0
628</small></address>
629
630</body>
631</html>
632