Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-release > by-pkgid > dabbad934aa2b21dfdf7cadba1bf877f > files > 45

libSDL_gfx-devel-2.0.22-1.mga1.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>SDL_gfx: SDL_rotozoom.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>SDL_rotozoom.c File Reference</h1><code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="_s_d_l__rotozoom_8h_source.html">SDL_rotozoom.h</a>&quot;</code><br/>

<p><a href="_s_d_l__rotozoom_8c_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structt_color_r_g_b_a.html">tColorRGBA</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A 32 bit RGBA pixel.  <a href="structt_color_r_g_b_a.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structt_color_y.html">tColorY</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A 8bit Y/palette pixel.  <a href="structt_color_y.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#afa99ec4acc4ecb2dc3c2d05da15d0e3f">MAX</a>(a, b)&nbsp;&nbsp;&nbsp;(((a) &gt; (b)) ? (a) : (b))</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns maximum of two numbers a and b.  <a href="#afa99ec4acc4ecb2dc3c2d05da15d0e3f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a05a2601b7ea2906858ccc31b45fdc6eb">GUARD_ROWS</a>&nbsp;&nbsp;&nbsp;(2)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Number of guard rows added to destination surfaces.  <a href="#a05a2601b7ea2906858ccc31b45fdc6eb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a98a929bd64d660c1860c7b60b4fe5bd9">VALUE_LIMIT</a>&nbsp;&nbsp;&nbsp;0.001</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Lower limit of absolute zoom factor or rotation degrees.  <a href="#a98a929bd64d660c1860c7b60b4fe5bd9"></a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Uint32&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#afe2a2e4dc6cc462c5fc98a2110b8e1ce">_colorkey</a> (SDL_Surface *src)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns colorkey info for a surface.  <a href="#afe2a2e4dc6cc462c5fc98a2110b8e1ce"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#ac1bde824f44ae9a76930e9782b783512">_shrinkSurfaceRGBA</a> (SDL_Surface *src, SDL_Surface *dst, int factorx, int factory)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal 32 bit integer-factor averaging Shrinker.  <a href="#ac1bde824f44ae9a76930e9782b783512"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#aadb38a61ab6727e5fd621b63418399be">_shrinkSurfaceY</a> (SDL_Surface *src, SDL_Surface *dst, int factorx, int factory)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal 8 bit integer-factor averaging shrinker.  <a href="#aadb38a61ab6727e5fd621b63418399be"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a9898b12bb565c4075c2da4db4891fd81">_zoomSurfaceRGBA</a> (SDL_Surface *src, SDL_Surface *dst, int flipx, int flipy, int smooth)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal 32 bit Zoomer with optional anti-aliasing by bilinear interpolation.  <a href="#a9898b12bb565c4075c2da4db4891fd81"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#acfeb5a322cbb575f105f1762d9d21c29">_zoomSurfaceY</a> (SDL_Surface *src, SDL_Surface *dst, int flipx, int flipy)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal 8 bit Zoomer without smoothing.  <a href="#acfeb5a322cbb575f105f1762d9d21c29"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#aae634e7b5e6ec1622fec361ecbd0d1b7">_transformSurfaceRGBA</a> (SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy, int smooth)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal 32 bit rotozoomer with optional anti-aliasing.  <a href="#aae634e7b5e6ec1622fec361ecbd0d1b7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a126e3b96b22cc18e78e33cc1f8eb6c3c">transformSurfaceY</a> (SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Rotates and zooms 8 bit palette/Y 'src' surface to 'dst' surface without smoothing.  <a href="#a126e3b96b22cc18e78e33cc1f8eb6c3c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SDL_Surface *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a77563d68634cb2624d4f2f0bcdc19e73">rotateSurface90Degrees</a> (SDL_Surface *src, int numClockwiseTurns)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Rotates a 32 bit surface in increments of 90 degrees.  <a href="#a77563d68634cb2624d4f2f0bcdc19e73"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#af48638a298820d4d1dd24a13896963d8">_rotozoomSurfaceSizeTrig</a> (int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight, double *canglezoom, double *sanglezoom)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Internal target surface sizing function for rotozooms with trig result return.  <a href="#af48638a298820d4d1dd24a13896963d8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#aee64992d26c818d9975610754d5c929b">rotozoomSurfaceSizeXY</a> (int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight)</td></tr>
<tr><td class="mdescLeft">&nbsp;</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...">rotozoomSurfaceXY()</a> call.  <a href="#aee64992d26c818d9975610754d5c929b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a9886c783255edfd70a4974f8f3dd5a8c">rotozoomSurfaceSize</a> (int width, int height, double angle, double zoom, int *dstwidth, int *dstheight)</td></tr>
<tr><td class="mdescLeft">&nbsp;</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="#a9886c783255edfd70a4974f8f3dd5a8c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SDL_Surface *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a5f64ed53eeee5f2667971c857698d1e5">rotozoomSurface</a> (SDL_Surface *src, double angle, double zoom, int smooth)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Rotates and zooms a surface and optional anti-aliasing.  <a href="#a5f64ed53eeee5f2667971c857698d1e5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SDL_Surface *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#aab98b5b0da4ea468bacf47f7b85f0ee2">rotozoomSurfaceXY</a> (SDL_Surface *src, double angle, double zoomx, double zoomy, int smooth)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing.  <a href="#aab98b5b0da4ea468bacf47f7b85f0ee2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a8ba40859c1a977dae87488dd8be1bf9a">zoomSurfaceSize</a> (int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight)</td></tr>
<tr><td class="mdescLeft">&nbsp;</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="#a8ba40859c1a977dae87488dd8be1bf9a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SDL_Surface *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#abdd772b2f6b1f26134e4e90cda657a21">zoomSurface</a> (SDL_Surface *src, double zoomx, double zoomy, int smooth)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Zoom a surface by independent horizontal and vertical factors with optional smoothing.  <a href="#abdd772b2f6b1f26134e4e90cda657a21"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SDL_Surface *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#aad3bf0cd89cc39ff874ffa778fa1495d">shrinkSurface</a> (SDL_Surface *src, int factorx, int factory)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Shrink a surface by an integer ratio using averaging.  <a href="#aad3bf0cd89cc39ff874ffa778fa1495d"></a><br/></td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="a05a2601b7ea2906858ccc31b45fdc6eb"></a><!-- doxytag: member="SDL_rotozoom.c::GUARD_ROWS" ref="a05a2601b7ea2906858ccc31b45fdc6eb" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define GUARD_ROWS&nbsp;&nbsp;&nbsp;(2)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Number of guard rows added to destination surfaces. </p>
<p>This is a simple but effective workaround for observed issues. These rows allocate extra memory and are then hidden from the surface. Rows are added to the end of destination surfaces when they are allocated. This catches any potential overflows which seem to happen with just the right src image dimensions and scale/rotation and can lead to a situation where the program can segfault. </p>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00052">52</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="afa99ec4acc4ecb2dc3c2d05da15d0e3f"></a><!-- doxytag: member="SDL_rotozoom.c::MAX" ref="afa99ec4acc4ecb2dc3c2d05da15d0e3f" args="(a, b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX</td>
          <td>(</td>
          <td class="paramtype">a, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">b&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td>&nbsp;&nbsp;&nbsp;(((a) &gt; (b)) ? (a) : (b))</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns maximum of two numbers a and b. </p>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00040">40</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a98a929bd64d660c1860c7b60b4fe5bd9"></a><!-- doxytag: member="SDL_rotozoom.c::VALUE_LIMIT" ref="a98a929bd64d660c1860c7b60b4fe5bd9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define VALUE_LIMIT&nbsp;&nbsp;&nbsp;0.001</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Lower limit of absolute zoom factor or rotation degrees. </p>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00057">57</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="afe2a2e4dc6cc462c5fc98a2110b8e1ce"></a><!-- doxytag: member="SDL_rotozoom.c::_colorkey" ref="afe2a2e4dc6cc462c5fc98a2110b8e1ce" args="(SDL_Surface *src)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Uint32 _colorkey </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>src</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns colorkey info for a surface. </p>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00062">62</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="af48638a298820d4d1dd24a13896963d8"></a><!-- doxytag: member="SDL_rotozoom.c::_rotozoomSurfaceSizeTrig" ref="af48638a298820d4d1dd24a13896963d8" args="(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight, double *canglezoom, double *sanglezoom)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _rotozoomSurfaceSizeTrig </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>dstwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>dstheight</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&nbsp;</td>
          <td class="paramname"> <em>canglezoom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double *&nbsp;</td>
          <td class="paramname"> <em>sanglezoom</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal target surface sizing function for rotozooms with trig result return. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>width</em>&nbsp;</td><td>The source surface width. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>height</em>&nbsp;</td><td>The source surface height. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>angle</em>&nbsp;</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>zoomx</em>&nbsp;</td><td>The horizontal scaling factor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>zoomy</em>&nbsp;</td><td>The vertical scaling factor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dstwidth</em>&nbsp;</td><td>The calculated width of the destination surface. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dstheight</em>&nbsp;</td><td>The calculated height of the destination surface. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>canglezoom</em>&nbsp;</td><td>The sine of the angle adjusted by the zoom factor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>sanglezoom</em>&nbsp;</td><td>The cosine of the angle adjusted by the zoom factor. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00924">924</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="ac1bde824f44ae9a76930e9782b783512"></a><!-- doxytag: member="SDL_rotozoom.c::_shrinkSurfaceRGBA" ref="ac1bde824f44ae9a76930e9782b783512" args="(SDL_Surface *src, SDL_Surface *dst, int factorx, int factory)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int _shrinkSurfaceRGBA </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>factorx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>factory</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal 32 bit integer-factor averaging Shrinker. </p>
<p>Shrinks 32 bit RGBA/ABGR 'src' surface to 'dst' surface. Averages color and alpha values values of src pixels to calculate dst pixels. Assumes src and dst surfaces are of 32 bit depth. Assumes dst surface was allocated with the correct dimensions.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>The surface to shrink (input). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dst</em>&nbsp;</td><td>The shrunken surface (output). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>factorx</em>&nbsp;</td><td>The horizontal shrinking ratio. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>factory</em>&nbsp;</td><td>The vertical shrinking ratio.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 for success or -1 for error. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00092">92</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="aadb38a61ab6727e5fd621b63418399be"></a><!-- doxytag: member="SDL_rotozoom.c::_shrinkSurfaceY" ref="aadb38a61ab6727e5fd621b63418399be" args="(SDL_Surface *src, SDL_Surface *dst, int factorx, int factory)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int _shrinkSurfaceY </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>factorx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>factory</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal 8 bit integer-factor averaging shrinker. </p>
<p>Shrinks 8bit Y 'src' surface to 'dst' surface. Averages color (brightness) values values of src pixels to calculate dst pixels. Assumes src and dst surfaces are of 8 bit depth. Assumes dst surface was allocated with the correct dimensions.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>The surface to shrink (input). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dst</em>&nbsp;</td><td>The shrunken surface (output). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>factorx</em>&nbsp;</td><td>The horizontal shrinking ratio. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>factory</em>&nbsp;</td><td>The vertical shrinking ratio.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 for success or -1 for error. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00181">181</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="aae634e7b5e6ec1622fec361ecbd0d1b7"></a><!-- doxytag: member="SDL_rotozoom.c::_transformSurfaceRGBA" ref="aae634e7b5e6ec1622fec361ecbd0d1b7" args="(SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy, int smooth)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _transformSurfaceRGBA </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>cx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>cy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>isin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>icos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>flipx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>flipy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>smooth</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal 32 bit rotozoomer with optional anti-aliasing. </p>
<p>Rotates and zooms 32 bit RGBA/ABGR 'src' surface to 'dst' surface based on the control parameters by scanning the destination surface and applying optionally anti-aliasing by bilinear interpolation. Assumes src and dst surfaces are of 32 bit depth. Assumes dst surface was allocated with the correct dimensions.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>Source surface. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dst</em>&nbsp;</td><td>Destination surface. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cx</em>&nbsp;</td><td>Horizontal center coordinate. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cy</em>&nbsp;</td><td>Vertical center coordinate. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>isin</em>&nbsp;</td><td>Integer version of sine of angle. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>icos</em>&nbsp;</td><td>Integer version of cosine of angle. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flipx</em>&nbsp;</td><td>Flag indicating horizontal mirroring should be applied. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flipy</em>&nbsp;</td><td>Flag indicating vertical mirroring should be applied. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>smooth</em>&nbsp;</td><td>Flag indicating anti-aliasing should be used. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00613">613</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a9898b12bb565c4075c2da4db4891fd81"></a><!-- doxytag: member="SDL_rotozoom.c::_zoomSurfaceRGBA" ref="a9898b12bb565c4075c2da4db4891fd81" args="(SDL_Surface *src, SDL_Surface *dst, int flipx, int flipy, int smooth)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int _zoomSurfaceRGBA </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>flipx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>flipy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>smooth</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal 32 bit Zoomer with optional anti-aliasing by bilinear interpolation. </p>
<p>Zooms 32 bit RGBA/ABGR 'src' surface to 'dst' surface. Assumes src and dst surfaces are of 32 bit depth. Assumes dst surface was allocated with the correct dimensions.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>The surface to zoom (input). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dst</em>&nbsp;</td><td>The zoomed surface (output). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flipx</em>&nbsp;</td><td>Flag indicating if the image should be horizontally flipped. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flipy</em>&nbsp;</td><td>Flag indicating if the image should be vertically flipped. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>smooth</em>&nbsp;</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 for success or -1 for error. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00265">265</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="acfeb5a322cbb575f105f1762d9d21c29"></a><!-- doxytag: member="SDL_rotozoom.c::_zoomSurfaceY" ref="acfeb5a322cbb575f105f1762d9d21c29" args="(SDL_Surface *src, SDL_Surface *dst, int flipx, int flipy)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int _zoomSurfaceY </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>flipx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>flipy</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Internal 8 bit Zoomer without smoothing. </p>
<p>Zooms 8bit palette/Y 'src' surface to 'dst' surface. Assumes src and dst surfaces are of 8 bit depth. Assumes dst surface was allocated with the correct dimensions.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>The surface to zoom (input). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dst</em>&nbsp;</td><td>The zoomed surface (output). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flipx</em>&nbsp;</td><td>Flag indicating if the image should be horizontally flipped. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flipy</em>&nbsp;</td><td>Flag indicating if the image should be vertically flipped.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 for success or -1 for error. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00496">496</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a77563d68634cb2624d4f2f0bcdc19e73"></a><!-- doxytag: member="SDL_rotozoom.c::rotateSurface90Degrees" ref="a77563d68634cb2624d4f2f0bcdc19e73" args="(SDL_Surface *src, int numClockwiseTurns)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Surface* rotateSurface90Degrees </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>numClockwiseTurns</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rotates a 32 bit surface in increments of 90 degrees. </p>
<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>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>Source surface to rotate. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>numClockwiseTurns</em>&nbsp;</td><td>Number of clockwise 90 degree turns to apply to the source.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The new, rotated surface; or NULL for surfaces with incorrect input format. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00789">789</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a5f64ed53eeee5f2667971c857698d1e5"></a><!-- doxytag: member="SDL_rotozoom.c::rotozoomSurface" ref="a5f64ed53eeee5f2667971c857698d1e5" args="(SDL_Surface *src, double angle, double zoom, int smooth)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Surface* rotozoomSurface </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>zoom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>smooth</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rotates and zooms a surface and optional anti-aliasing. </p>
<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>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>The surface to rotozoom. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>angle</em>&nbsp;</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>zoom</em>&nbsp;</td><td>The scaling factor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>smooth</em>&nbsp;</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The new rotozoomed surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01005">1005</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a9886c783255edfd70a4974f8f3dd5a8c"></a><!-- doxytag: member="SDL_rotozoom.c::rotozoomSurfaceSize" ref="a9886c783255edfd70a4974f8f3dd5a8c" args="(int width, int height, double angle, double zoom, int *dstwidth, int *dstheight)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rotozoomSurfaceSize </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>zoom</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>dstwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>dstheight</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<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>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>width</em>&nbsp;</td><td>The source surface width. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>height</em>&nbsp;</td><td>The source surface height. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>angle</em>&nbsp;</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>zoom</em>&nbsp;</td><td>The scaling factor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dstwidth</em>&nbsp;</td><td>The calculated width of the rotozoomed destination surface. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dstheight</em>&nbsp;</td><td>The calculated height of the rotozoomed destination surface. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00983">983</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="aee64992d26c818d9975610754d5c929b"></a><!-- doxytag: member="SDL_rotozoom.c::rotozoomSurfaceSizeXY" ref="aee64992d26c818d9975610754d5c929b" args="(int width, int height, double angle, double zoomx, double zoomy, int *dstwidth, int *dstheight)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void rotozoomSurfaceSizeXY </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>dstwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>dstheight</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<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...">rotozoomSurfaceXY()</a> call. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>width</em>&nbsp;</td><td>The source surface width. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>height</em>&nbsp;</td><td>The source surface height. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>angle</em>&nbsp;</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>zoomx</em>&nbsp;</td><td>The horizontal scaling factor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>zoomy</em>&nbsp;</td><td>The vertical scaling factor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dstwidth</em>&nbsp;</td><td>The calculated width of the rotozoomed destination surface. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dstheight</em>&nbsp;</td><td>The calculated height of the rotozoomed destination surface. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00966">966</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="aab98b5b0da4ea468bacf47f7b85f0ee2"></a><!-- doxytag: member="SDL_rotozoom.c::rotozoomSurfaceXY" ref="aab98b5b0da4ea468bacf47f7b85f0ee2" args="(SDL_Surface *src, double angle, double zoomx, double zoomy, int smooth)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Surface* rotozoomSurfaceXY </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>angle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>smooth</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing. </p>
<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>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>The surface to rotozoom. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>angle</em>&nbsp;</td><td>The angle to rotate in degrees. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>zoomx</em>&nbsp;</td><td>The horizontal scaling factor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>zoomy</em>&nbsp;</td><td>The vertical scaling factor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>smooth</em>&nbsp;</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The new rotozoomed surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01026">1026</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="aad3bf0cd89cc39ff874ffa778fa1495d"></a><!-- doxytag: member="SDL_rotozoom.c::shrinkSurface" ref="aad3bf0cd89cc39ff874ffa778fa1495d" args="(SDL_Surface *src, int factorx, int factory)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Surface* shrinkSurface </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>factorx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>factory</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Shrink a surface by an integer ratio using averaging. </p>
<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>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>The surface to shrink. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>factorx</em>&nbsp;</td><td>The horizontal shrinking ratio. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>factory</em>&nbsp;</td><td>The vertical shrinking ratio.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The new, shrunken surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01512">1512</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a126e3b96b22cc18e78e33cc1f8eb6c3c"></a><!-- doxytag: member="SDL_rotozoom.c::transformSurfaceY" ref="a126e3b96b22cc18e78e33cc1f8eb6c3c" args="(SDL_Surface *src, SDL_Surface *dst, int cx, int cy, int isin, int icos, int flipx, int flipy)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void transformSurfaceY </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>cx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>cy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>isin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>icos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>flipx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>flipy</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Rotates and zooms 8 bit palette/Y 'src' surface to 'dst' surface without smoothing. </p>
<p>Rotates and zooms 8 bit RGBA/ABGR 'src' surface to 'dst' surface based on the control parameters by scanning the destination surface. Assumes src and dst surfaces are of 8 bit depth. Assumes dst surface was allocated with the correct dimensions.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>Source surface. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dst</em>&nbsp;</td><td>Destination surface. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cx</em>&nbsp;</td><td>Horizontal center coordinate. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cy</em>&nbsp;</td><td>Vertical center coordinate. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>isin</em>&nbsp;</td><td>Integer version of sine of angle. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>icos</em>&nbsp;</td><td>Integer version of cosine of angle. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flipx</em>&nbsp;</td><td>Flag indicating horizontal mirroring should be applied. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>flipy</em>&nbsp;</td><td>Flag indicating vertical mirroring should be applied. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00730">730</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="abdd772b2f6b1f26134e4e90cda657a21"></a><!-- doxytag: member="SDL_rotozoom.c::zoomSurface" ref="abdd772b2f6b1f26134e4e90cda657a21" args="(SDL_Surface *src, double zoomx, double zoomy, int smooth)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SDL_Surface* zoomSurface </td>
          <td>(</td>
          <td class="paramtype">SDL_Surface *&nbsp;</td>
          <td class="paramname"> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>smooth</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Zoom a surface by independent horizontal and vertical factors with optional smoothing. </p>
<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>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>The surface to zoom. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>zoomx</em>&nbsp;</td><td>The horizontal zoom factor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>zoomy</em>&nbsp;</td><td>The vertical zoom factor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>smooth</em>&nbsp;</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The new, zoomed surface. </dd></dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01367">1367</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
<a class="anchor" id="a8ba40859c1a977dae87488dd8be1bf9a"></a><!-- doxytag: member="SDL_rotozoom.c::zoomSurfaceSize" ref="a8ba40859c1a977dae87488dd8be1bf9a" args="(int width, int height, double zoomx, double zoomy, int *dstwidth, int *dstheight)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void zoomSurfaceSize </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>zoomx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>zoomy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>dstwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>dstheight</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<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>
<p>The minimum size of the target surface is 1. The input factors can be positive or negative.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>width</em>&nbsp;</td><td>The width of the source surface to zoom. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>height</em>&nbsp;</td><td>The height of the source surface to zoom. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>zoomx</em>&nbsp;</td><td>The horizontal zoom factor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>zoomy</em>&nbsp;</td><td>The vertical zoom factor. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dstwidth</em>&nbsp;</td><td>Pointer to an integer to store the calculated width of the zoomed target surface. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dstheight</em>&nbsp;</td><td>Pointer to an integer to store the calculated height of the zoomed target surface. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l01317">1317</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p>

</div>
</div>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>