| 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.c 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 |
 <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 Page</span></a></li> |
| 42 |
<li><a href="annotated.html"><span>Data 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 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="#nested-classes">Data Structures</a> | |
| 56 |
<a href="#define-members">Defines</a> | |
| 57 |
<a href="#typedef-members">Typedefs</a> | |
| 58 |
<a href="#func-members">Functions</a> </div> |
| 59 |
<div class="headertitle"> |
| 60 |
<div class="title">I:/Sources/sdlgfx/SDL_rotozoom.c File Reference</div> </div> |
| 61 |
</div><!--header--> |
| 62 |
<div class="contents"> |
| 63 |
<div class="textblock"><code>#include <stdlib.h></code><br/> |
| 64 |
<code>#include <string.h></code><br/> |
| 65 |
<code>#include "<a class="el" href="_s_d_l__rotozoom_8h_source.html">SDL_rotozoom.h</a>"</code><br/> |
| 66 |
</div> |
| 67 |
<p><a href="_s_d_l__rotozoom_8c_source.html">Go to the source code of this file.</a></p> |
| 68 |
<table class="memberdecls"> |
| 69 |
<tr><td colspan="2"><h2><a name="nested-classes"></a> |
| 70 |
Data Structures</h2></td></tr> |
| 71 |
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structt_color_r_g_b_a.html">tColorRGBA</a></td></tr> |
| 72 |
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A 32 bit RGBA pixel. <a href="structt_color_r_g_b_a.html#details">More...</a><br/></td></tr> |
| 73 |
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structt_color_y.html">tColorY</a></td></tr> |
| 74 |
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A 8bit Y/palette pixel. <a href="structt_color_y.html#details">More...</a><br/></td></tr> |
| 75 |
<tr><td colspan="2"><h2><a name="define-members"></a> |
| 76 |
Defines</h2></td></tr> |
| 77 |
<tr class="memitem:afa99ec4acc4ecb2dc3c2d05da15d0e3f"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#afa99ec4acc4ecb2dc3c2d05da15d0e3f">MAX</a>(a, b)   (((a) > (b)) ? (a) : (b))</td></tr> |
| 78 |
<tr class="memdesc:afa99ec4acc4ecb2dc3c2d05da15d0e3f"><td class="mdescLeft"> </td><td class="mdescRight">Returns maximum of two numbers a and b. <a href="#afa99ec4acc4ecb2dc3c2d05da15d0e3f"></a><br/></td></tr> |
| 79 |
<tr class="memitem:a05a2601b7ea2906858ccc31b45fdc6eb"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a05a2601b7ea2906858ccc31b45fdc6eb">GUARD_ROWS</a>   (2)</td></tr> |
| 80 |
<tr class="memdesc:a05a2601b7ea2906858ccc31b45fdc6eb"><td class="mdescLeft"> </td><td class="mdescRight">Number of guard rows added to destination surfaces. <a href="#a05a2601b7ea2906858ccc31b45fdc6eb"></a><br/></td></tr> |
| 81 |
<tr class="memitem:a98a929bd64d660c1860c7b60b4fe5bd9"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a98a929bd64d660c1860c7b60b4fe5bd9">VALUE_LIMIT</a>   0.001</td></tr> |
| 82 |
<tr class="memdesc:a98a929bd64d660c1860c7b60b4fe5bd9"><td class="mdescLeft"> </td><td class="mdescRight">Lower limit of absolute zoom factor or rotation degrees. <a href="#a98a929bd64d660c1860c7b60b4fe5bd9"></a><br/></td></tr> |
| 83 |
<tr><td colspan="2"><h2><a name="typedef-members"></a> |
| 84 |
Typedefs</h2></td></tr> |
| 85 |
<tr class="memitem:ac91ff95383d3a6c0df046a42e23baf04"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structt_color_r_g_b_a.html">tColorRGBA</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#ac91ff95383d3a6c0df046a42e23baf04">tColorRGBA</a></td></tr> |
| 86 |
<tr class="memdesc:ac91ff95383d3a6c0df046a42e23baf04"><td class="mdescLeft"> </td><td class="mdescRight">A 32 bit RGBA pixel. <a href="#ac91ff95383d3a6c0df046a42e23baf04"></a><br/></td></tr> |
| 87 |
<tr class="memitem:a9db27e25d1a6e93c64eb768007dcf3da"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structt_color_y.html">tColorY</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#a9db27e25d1a6e93c64eb768007dcf3da">tColorY</a></td></tr> |
| 88 |
<tr class="memdesc:a9db27e25d1a6e93c64eb768007dcf3da"><td class="mdescLeft"> </td><td class="mdescRight">A 8bit Y/palette pixel. <a href="#a9db27e25d1a6e93c64eb768007dcf3da"></a><br/></td></tr> |
| 89 |
<tr><td colspan="2"><h2><a name="func-members"></a> |
| 90 |
Functions</h2></td></tr> |
| 91 |
<tr class="memitem:afe2a2e4dc6cc462c5fc98a2110b8e1ce"><td class="memItemLeft" align="right" valign="top">Uint32 </td><td class="memItemRight" valign="bottom"><a class="el" href="_s_d_l__rotozoom_8c.html#afe2a2e4dc6cc462c5fc98a2110b8e1ce">_colorkey</a> (SDL_Surface *src)</td></tr> |
| 92 |
<tr class="memdesc:afe2a2e4dc6cc462c5fc98a2110b8e1ce"><td class="mdescLeft"> </td><td class="mdescRight">Returns colorkey info for a surface. <a href="#afe2a2e4dc6cc462c5fc98a2110b8e1ce"></a><br/></td></tr> |
| 93 |
<tr class="memitem:ac1bde824f44ae9a76930e9782b783512"><td class="memItemLeft" align="right" valign="top">int </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> |
| 94 |
<tr class="memdesc:ac1bde824f44ae9a76930e9782b783512"><td class="mdescLeft"> </td><td class="mdescRight">Internal 32 bit integer-factor averaging Shrinker. <a href="#ac1bde824f44ae9a76930e9782b783512"></a><br/></td></tr> |
| 95 |
<tr class="memitem:aadb38a61ab6727e5fd621b63418399be"><td class="memItemLeft" align="right" valign="top">int </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> |
| 96 |
<tr class="memdesc:aadb38a61ab6727e5fd621b63418399be"><td class="mdescLeft"> </td><td class="mdescRight">Internal 8 bit integer-factor averaging shrinker. <a href="#aadb38a61ab6727e5fd621b63418399be"></a><br/></td></tr> |
| 97 |
<tr class="memitem:a9898b12bb565c4075c2da4db4891fd81"><td class="memItemLeft" align="right" valign="top">int </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> |
| 98 |
<tr class="memdesc:a9898b12bb565c4075c2da4db4891fd81"><td class="mdescLeft"> </td><td class="mdescRight">Internal 32 bit Zoomer with optional anti-aliasing by bilinear interpolation. <a href="#a9898b12bb565c4075c2da4db4891fd81"></a><br/></td></tr> |
| 99 |
<tr class="memitem:acfeb5a322cbb575f105f1762d9d21c29"><td class="memItemLeft" align="right" valign="top">int </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> |
| 100 |
<tr class="memdesc:acfeb5a322cbb575f105f1762d9d21c29"><td class="mdescLeft"> </td><td class="mdescRight">Internal 8 bit Zoomer without smoothing. <a href="#acfeb5a322cbb575f105f1762d9d21c29"></a><br/></td></tr> |
| 101 |
<tr class="memitem:aae634e7b5e6ec1622fec361ecbd0d1b7"><td class="memItemLeft" align="right" valign="top">void </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> |
| 102 |
<tr class="memdesc:aae634e7b5e6ec1622fec361ecbd0d1b7"><td class="mdescLeft"> </td><td class="mdescRight">Internal 32 bit rotozoomer with optional anti-aliasing. <a href="#aae634e7b5e6ec1622fec361ecbd0d1b7"></a><br/></td></tr> |
| 103 |
<tr class="memitem:a126e3b96b22cc18e78e33cc1f8eb6c3c"><td class="memItemLeft" align="right" valign="top">void </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> |
| 104 |
<tr class="memdesc:a126e3b96b22cc18e78e33cc1f8eb6c3c"><td class="mdescLeft"> </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> |
| 105 |
<tr class="memitem:a77563d68634cb2624d4f2f0bcdc19e73"><td class="memItemLeft" align="right" valign="top">SDL_Surface * </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> |
| 106 |
<tr class="memdesc:a77563d68634cb2624d4f2f0bcdc19e73"><td class="mdescLeft"> </td><td class="mdescRight">Rotates a 32 bit surface in increments of 90 degrees. <a href="#a77563d68634cb2624d4f2f0bcdc19e73"></a><br/></td></tr> |
| 107 |
<tr class="memitem:af48638a298820d4d1dd24a13896963d8"><td class="memItemLeft" align="right" valign="top">void </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> |
| 108 |
<tr class="memdesc:af48638a298820d4d1dd24a13896963d8"><td class="mdescLeft"> </td><td class="mdescRight">Internal target surface sizing function for rotozooms with trig result return. <a href="#af48638a298820d4d1dd24a13896963d8"></a><br/></td></tr> |
| 109 |
<tr class="memitem:aee64992d26c818d9975610754d5c929b"><td class="memItemLeft" align="right" valign="top">void </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> |
| 110 |
<tr class="memdesc:aee64992d26c818d9975610754d5c929b"><td class="mdescLeft"> </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="#aee64992d26c818d9975610754d5c929b"></a><br/></td></tr> |
| 111 |
<tr class="memitem:a9886c783255edfd70a4974f8f3dd5a8c"><td class="memItemLeft" align="right" valign="top">void </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> |
| 112 |
<tr class="memdesc:a9886c783255edfd70a4974f8f3dd5a8c"><td class="mdescLeft"> </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> |
| 113 |
<tr class="memitem:a5f64ed53eeee5f2667971c857698d1e5"><td class="memItemLeft" align="right" valign="top">SDL_Surface * </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> |
| 114 |
<tr class="memdesc:a5f64ed53eeee5f2667971c857698d1e5"><td class="mdescLeft"> </td><td class="mdescRight">Rotates and zooms a surface and optional anti-aliasing. <a href="#a5f64ed53eeee5f2667971c857698d1e5"></a><br/></td></tr> |
| 115 |
<tr class="memitem:aab98b5b0da4ea468bacf47f7b85f0ee2"><td class="memItemLeft" align="right" valign="top">SDL_Surface * </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> |
| 116 |
<tr class="memdesc:aab98b5b0da4ea468bacf47f7b85f0ee2"><td class="mdescLeft"> </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> |
| 117 |
<tr class="memitem:a8ba40859c1a977dae87488dd8be1bf9a"><td class="memItemLeft" align="right" valign="top">void </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> |
| 118 |
<tr class="memdesc:a8ba40859c1a977dae87488dd8be1bf9a"><td class="mdescLeft"> </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> |
| 119 |
<tr class="memitem:abdd772b2f6b1f26134e4e90cda657a21"><td class="memItemLeft" align="right" valign="top">SDL_Surface * </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> |
| 120 |
<tr class="memdesc:abdd772b2f6b1f26134e4e90cda657a21"><td class="mdescLeft"> </td><td class="mdescRight">Zoom a surface by independent horizontal and vertical factors with optional smoothing. <a href="#abdd772b2f6b1f26134e4e90cda657a21"></a><br/></td></tr> |
| 121 |
<tr class="memitem:aad3bf0cd89cc39ff874ffa778fa1495d"><td class="memItemLeft" align="right" valign="top">SDL_Surface * </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> |
| 122 |
<tr class="memdesc:aad3bf0cd89cc39ff874ffa778fa1495d"><td class="mdescLeft"> </td><td class="mdescRight">Shrink a surface by an integer ratio using averaging. <a href="#aad3bf0cd89cc39ff874ffa778fa1495d"></a><br/></td></tr> |
| 123 |
</table> |
| 124 |
<hr/><h2>Define Documentation</h2> |
| 125 |
<a class="anchor" id="a05a2601b7ea2906858ccc31b45fdc6eb"></a> |
| 126 |
<div class="memitem"> |
| 127 |
<div class="memproto"> |
| 128 |
<table class="memname"> |
| 129 |
<tr> |
| 130 |
<td class="memname">#define <a class="el" href="_s_d_l__rotozoom_8c.html#a05a2601b7ea2906858ccc31b45fdc6eb">GUARD_ROWS</a>   (2)</td> |
| 131 |
</tr> |
| 132 |
</table> |
| 133 |
</div> |
| 134 |
<div class="memdoc"> |
| 135 |
|
| 136 |
<p>Number of guard rows added to destination surfaces. </p> |
| 137 |
<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> |
| 138 |
|
| 139 |
<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00073">73</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p> |
| 140 |
|
| 141 |
</div> |
| 142 |
</div> |
| 143 |
<a class="anchor" id="afa99ec4acc4ecb2dc3c2d05da15d0e3f"></a> |
| 144 |
<div class="memitem"> |
| 145 |
<div class="memproto"> |
| 146 |
<table class="memname"> |
| 147 |
<tr> |
| 148 |
<td class="memname">#define <a class="el" href="_s_d_l__rotozoom_8c.html#afa99ec4acc4ecb2dc3c2d05da15d0e3f">MAX</a></td> |
| 149 |
<td>(</td> |
| 150 |
<td class="paramtype"> </td> |
| 151 |
<td class="paramname">a, </td> |
| 152 |
</tr> |
| 153 |
<tr> |
| 154 |
<td class="paramkey"></td> |
| 155 |
<td></td> |
| 156 |
<td class="paramtype"> </td> |
| 157 |
<td class="paramname">b </td> |
| 158 |
</tr> |
| 159 |
<tr> |
| 160 |
<td></td> |
| 161 |
<td>)</td> |
| 162 |
<td></td><td>   (((a) > (b)) ? (a) : (b))</td> |
| 163 |
</tr> |
| 164 |
</table> |
| 165 |
</div> |
| 166 |
<div class="memdoc"> |
| 167 |
|
| 168 |
<p>Returns maximum of two numbers a and b. </p> |
| 169 |
|
| 170 |
<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00061">61</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p> |
| 171 |
|
| 172 |
</div> |
| 173 |
</div> |
| 174 |
<a class="anchor" id="a98a929bd64d660c1860c7b60b4fe5bd9"></a> |
| 175 |
<div class="memitem"> |
| 176 |
<div class="memproto"> |
| 177 |
<table class="memname"> |
| 178 |
<tr> |
| 179 |
<td class="memname">#define <a class="el" href="_s_d_l__rotozoom_8c.html#a98a929bd64d660c1860c7b60b4fe5bd9">VALUE_LIMIT</a>   0.001</td> |
| 180 |
</tr> |
| 181 |
</table> |
| 182 |
</div> |
| 183 |
<div class="memdoc"> |
| 184 |
|
| 185 |
<p>Lower limit of absolute zoom factor or rotation degrees. </p> |
| 186 |
|
| 187 |
<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00078">78</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p> |
| 188 |
|
| 189 |
</div> |
| 190 |
</div> |
| 191 |
<hr/><h2>Typedef Documentation</h2> |
| 192 |
<a class="anchor" id="ac91ff95383d3a6c0df046a42e23baf04"></a> |
| 193 |
<div class="memitem"> |
| 194 |
<div class="memproto"> |
| 195 |
<table class="memname"> |
| 196 |
<tr> |
| 197 |
<td class="memname">typedef struct <a class="el" href="structt_color_r_g_b_a.html">tColorRGBA</a> <a class="el" href="structt_color_r_g_b_a.html">tColorRGBA</a></td> |
| 198 |
</tr> |
| 199 |
</table> |
| 200 |
</div> |
| 201 |
<div class="memdoc"> |
| 202 |
|
| 203 |
<p>A 32 bit RGBA pixel. </p> |
| 204 |
|
| 205 |
</div> |
| 206 |
</div> |
| 207 |
<a class="anchor" id="a9db27e25d1a6e93c64eb768007dcf3da"></a> |
| 208 |
<div class="memitem"> |
| 209 |
<div class="memproto"> |
| 210 |
<table class="memname"> |
| 211 |
<tr> |
| 212 |
<td class="memname">typedef struct <a class="el" href="structt_color_y.html">tColorY</a> <a class="el" href="structt_color_y.html">tColorY</a></td> |
| 213 |
</tr> |
| 214 |
</table> |
| 215 |
</div> |
| 216 |
<div class="memdoc"> |
| 217 |
|
| 218 |
<p>A 8bit Y/palette pixel. </p> |
| 219 |
|
| 220 |
</div> |
| 221 |
</div> |
| 222 |
<hr/><h2>Function Documentation</h2> |
| 223 |
<a class="anchor" id="afe2a2e4dc6cc462c5fc98a2110b8e1ce"></a> |
| 224 |
<div class="memitem"> |
| 225 |
<div class="memproto"> |
| 226 |
<table class="memname"> |
| 227 |
<tr> |
| 228 |
<td class="memname">Uint32 <a class="el" href="_s_d_l__rotozoom_8c.html#afe2a2e4dc6cc462c5fc98a2110b8e1ce">_colorkey</a> </td> |
| 229 |
<td>(</td> |
| 230 |
<td class="paramtype">SDL_Surface * </td> |
| 231 |
<td class="paramname"><em>src</em></td><td>)</td> |
| 232 |
<td></td> |
| 233 |
</tr> |
| 234 |
</table> |
| 235 |
</div> |
| 236 |
<div class="memdoc"> |
| 237 |
|
| 238 |
<p>Returns colorkey info for a surface. </p> |
| 239 |
|
| 240 |
<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00083">83</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p> |
| 241 |
|
| 242 |
</div> |
| 243 |
</div> |
| 244 |
<a class="anchor" id="af48638a298820d4d1dd24a13896963d8"></a> |
| 245 |
<div class="memitem"> |
| 246 |
<div class="memproto"> |
| 247 |
<table class="memname"> |
| 248 |
<tr> |
| 249 |
<td class="memname">void <a class="el" href="_s_d_l__rotozoom_8c.html#af48638a298820d4d1dd24a13896963d8">_rotozoomSurfaceSizeTrig</a> </td> |
| 250 |
<td>(</td> |
| 251 |
<td class="paramtype">int </td> |
| 252 |
<td class="paramname"><em>width</em>, </td> |
| 253 |
</tr> |
| 254 |
<tr> |
| 255 |
<td class="paramkey"></td> |
| 256 |
<td></td> |
| 257 |
<td class="paramtype">int </td> |
| 258 |
<td class="paramname"><em>height</em>, </td> |
| 259 |
</tr> |
| 260 |
<tr> |
| 261 |
<td class="paramkey"></td> |
| 262 |
<td></td> |
| 263 |
<td class="paramtype">double </td> |
| 264 |
<td class="paramname"><em>angle</em>, </td> |
| 265 |
</tr> |
| 266 |
<tr> |
| 267 |
<td class="paramkey"></td> |
| 268 |
<td></td> |
| 269 |
<td class="paramtype">double </td> |
| 270 |
<td class="paramname"><em>zoomx</em>, </td> |
| 271 |
</tr> |
| 272 |
<tr> |
| 273 |
<td class="paramkey"></td> |
| 274 |
<td></td> |
| 275 |
<td class="paramtype">double </td> |
| 276 |
<td class="paramname"><em>zoomy</em>, </td> |
| 277 |
</tr> |
| 278 |
<tr> |
| 279 |
<td class="paramkey"></td> |
| 280 |
<td></td> |
| 281 |
<td class="paramtype">int * </td> |
| 282 |
<td class="paramname"><em>dstwidth</em>, </td> |
| 283 |
</tr> |
| 284 |
<tr> |
| 285 |
<td class="paramkey"></td> |
| 286 |
<td></td> |
| 287 |
<td class="paramtype">int * </td> |
| 288 |
<td class="paramname"><em>dstheight</em>, </td> |
| 289 |
</tr> |
| 290 |
<tr> |
| 291 |
<td class="paramkey"></td> |
| 292 |
<td></td> |
| 293 |
<td class="paramtype">double * </td> |
| 294 |
<td class="paramname"><em>canglezoom</em>, </td> |
| 295 |
</tr> |
| 296 |
<tr> |
| 297 |
<td class="paramkey"></td> |
| 298 |
<td></td> |
| 299 |
<td class="paramtype">double * </td> |
| 300 |
<td class="paramname"><em>sanglezoom</em> </td> |
| 301 |
</tr> |
| 302 |
<tr> |
| 303 |
<td></td> |
| 304 |
<td>)</td> |
| 305 |
<td></td><td></td> |
| 306 |
</tr> |
| 307 |
</table> |
| 308 |
</div> |
| 309 |
<div class="memdoc"> |
| 310 |
|
| 311 |
<p>Internal target surface sizing function for rotozooms with trig result return. </p> |
| 312 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 313 |
<table class="params"> |
| 314 |
<tr><td class="paramname">width</td><td>The source surface width. </td></tr> |
| 315 |
<tr><td class="paramname">height</td><td>The source surface height. </td></tr> |
| 316 |
<tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr> |
| 317 |
<tr><td class="paramname">zoomx</td><td>The horizontal scaling factor. </td></tr> |
| 318 |
<tr><td class="paramname">zoomy</td><td>The vertical scaling factor. </td></tr> |
| 319 |
<tr><td class="paramname">dstwidth</td><td>The calculated width of the destination surface. </td></tr> |
| 320 |
<tr><td class="paramname">dstheight</td><td>The calculated height of the destination surface. </td></tr> |
| 321 |
<tr><td class="paramname">canglezoom</td><td>The sine of the angle adjusted by the zoom factor. </td></tr> |
| 322 |
<tr><td class="paramname">sanglezoom</td><td>The cosine of the angle adjusted by the zoom factor. </td></tr> |
| 323 |
</table> |
| 324 |
</dd> |
| 325 |
</dl> |
| 326 |
|
| 327 |
<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00949">949</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p> |
| 328 |
|
| 329 |
</div> |
| 330 |
</div> |
| 331 |
<a class="anchor" id="ac1bde824f44ae9a76930e9782b783512"></a> |
| 332 |
<div class="memitem"> |
| 333 |
<div class="memproto"> |
| 334 |
<table class="memname"> |
| 335 |
<tr> |
| 336 |
<td class="memname">int <a class="el" href="_s_d_l__rotozoom_8c.html#ac1bde824f44ae9a76930e9782b783512">_shrinkSurfaceRGBA</a> </td> |
| 337 |
<td>(</td> |
| 338 |
<td class="paramtype">SDL_Surface * </td> |
| 339 |
<td class="paramname"><em>src</em>, </td> |
| 340 |
</tr> |
| 341 |
<tr> |
| 342 |
<td class="paramkey"></td> |
| 343 |
<td></td> |
| 344 |
<td class="paramtype">SDL_Surface * </td> |
| 345 |
<td class="paramname"><em>dst</em>, </td> |
| 346 |
</tr> |
| 347 |
<tr> |
| 348 |
<td class="paramkey"></td> |
| 349 |
<td></td> |
| 350 |
<td class="paramtype">int </td> |
| 351 |
<td class="paramname"><em>factorx</em>, </td> |
| 352 |
</tr> |
| 353 |
<tr> |
| 354 |
<td class="paramkey"></td> |
| 355 |
<td></td> |
| 356 |
<td class="paramtype">int </td> |
| 357 |
<td class="paramname"><em>factory</em> </td> |
| 358 |
</tr> |
| 359 |
<tr> |
| 360 |
<td></td> |
| 361 |
<td>)</td> |
| 362 |
<td></td><td></td> |
| 363 |
</tr> |
| 364 |
</table> |
| 365 |
</div> |
| 366 |
<div class="memdoc"> |
| 367 |
|
| 368 |
<p>Internal 32 bit integer-factor averaging Shrinker. </p> |
| 369 |
<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> |
| 370 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 371 |
<table class="params"> |
| 372 |
<tr><td class="paramname">src</td><td>The surface to shrink (input). </td></tr> |
| 373 |
<tr><td class="paramname">dst</td><td>The shrunken surface (output). </td></tr> |
| 374 |
<tr><td class="paramname">factorx</td><td>The horizontal shrinking ratio. </td></tr> |
| 375 |
<tr><td class="paramname">factory</td><td>The vertical shrinking ratio.</td></tr> |
| 376 |
</table> |
| 377 |
</dd> |
| 378 |
</dl> |
| 379 |
<dl class="section return"><dt>Returns:</dt><dd>0 for success or -1 for error. </dd></dl> |
| 380 |
|
| 381 |
<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00113">113</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p> |
| 382 |
|
| 383 |
</div> |
| 384 |
</div> |
| 385 |
<a class="anchor" id="aadb38a61ab6727e5fd621b63418399be"></a> |
| 386 |
<div class="memitem"> |
| 387 |
<div class="memproto"> |
| 388 |
<table class="memname"> |
| 389 |
<tr> |
| 390 |
<td class="memname">int <a class="el" href="_s_d_l__rotozoom_8c.html#aadb38a61ab6727e5fd621b63418399be">_shrinkSurfaceY</a> </td> |
| 391 |
<td>(</td> |
| 392 |
<td class="paramtype">SDL_Surface * </td> |
| 393 |
<td class="paramname"><em>src</em>, </td> |
| 394 |
</tr> |
| 395 |
<tr> |
| 396 |
<td class="paramkey"></td> |
| 397 |
<td></td> |
| 398 |
<td class="paramtype">SDL_Surface * </td> |
| 399 |
<td class="paramname"><em>dst</em>, </td> |
| 400 |
</tr> |
| 401 |
<tr> |
| 402 |
<td class="paramkey"></td> |
| 403 |
<td></td> |
| 404 |
<td class="paramtype">int </td> |
| 405 |
<td class="paramname"><em>factorx</em>, </td> |
| 406 |
</tr> |
| 407 |
<tr> |
| 408 |
<td class="paramkey"></td> |
| 409 |
<td></td> |
| 410 |
<td class="paramtype">int </td> |
| 411 |
<td class="paramname"><em>factory</em> </td> |
| 412 |
</tr> |
| 413 |
<tr> |
| 414 |
<td></td> |
| 415 |
<td>)</td> |
| 416 |
<td></td><td></td> |
| 417 |
</tr> |
| 418 |
</table> |
| 419 |
</div> |
| 420 |
<div class="memdoc"> |
| 421 |
|
| 422 |
<p>Internal 8 bit integer-factor averaging shrinker. </p> |
| 423 |
<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> |
| 424 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 425 |
<table class="params"> |
| 426 |
<tr><td class="paramname">src</td><td>The surface to shrink (input). </td></tr> |
| 427 |
<tr><td class="paramname">dst</td><td>The shrunken surface (output). </td></tr> |
| 428 |
<tr><td class="paramname">factorx</td><td>The horizontal shrinking ratio. </td></tr> |
| 429 |
<tr><td class="paramname">factory</td><td>The vertical shrinking ratio.</td></tr> |
| 430 |
</table> |
| 431 |
</dd> |
| 432 |
</dl> |
| 433 |
<dl class="section return"><dt>Returns:</dt><dd>0 for success or -1 for error. </dd></dl> |
| 434 |
|
| 435 |
<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00202">202</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p> |
| 436 |
|
| 437 |
</div> |
| 438 |
</div> |
| 439 |
<a class="anchor" id="aae634e7b5e6ec1622fec361ecbd0d1b7"></a> |
| 440 |
<div class="memitem"> |
| 441 |
<div class="memproto"> |
| 442 |
<table class="memname"> |
| 443 |
<tr> |
| 444 |
<td class="memname">void <a class="el" href="_s_d_l__rotozoom_8c.html#aae634e7b5e6ec1622fec361ecbd0d1b7">_transformSurfaceRGBA</a> </td> |
| 445 |
<td>(</td> |
| 446 |
<td class="paramtype">SDL_Surface * </td> |
| 447 |
<td class="paramname"><em>src</em>, </td> |
| 448 |
</tr> |
| 449 |
<tr> |
| 450 |
<td class="paramkey"></td> |
| 451 |
<td></td> |
| 452 |
<td class="paramtype">SDL_Surface * </td> |
| 453 |
<td class="paramname"><em>dst</em>, </td> |
| 454 |
</tr> |
| 455 |
<tr> |
| 456 |
<td class="paramkey"></td> |
| 457 |
<td></td> |
| 458 |
<td class="paramtype">int </td> |
| 459 |
<td class="paramname"><em>cx</em>, </td> |
| 460 |
</tr> |
| 461 |
<tr> |
| 462 |
<td class="paramkey"></td> |
| 463 |
<td></td> |
| 464 |
<td class="paramtype">int </td> |
| 465 |
<td class="paramname"><em>cy</em>, </td> |
| 466 |
</tr> |
| 467 |
<tr> |
| 468 |
<td class="paramkey"></td> |
| 469 |
<td></td> |
| 470 |
<td class="paramtype">int </td> |
| 471 |
<td class="paramname"><em>isin</em>, </td> |
| 472 |
</tr> |
| 473 |
<tr> |
| 474 |
<td class="paramkey"></td> |
| 475 |
<td></td> |
| 476 |
<td class="paramtype">int </td> |
| 477 |
<td class="paramname"><em>icos</em>, </td> |
| 478 |
</tr> |
| 479 |
<tr> |
| 480 |
<td class="paramkey"></td> |
| 481 |
<td></td> |
| 482 |
<td class="paramtype">int </td> |
| 483 |
<td class="paramname"><em>flipx</em>, </td> |
| 484 |
</tr> |
| 485 |
<tr> |
| 486 |
<td class="paramkey"></td> |
| 487 |
<td></td> |
| 488 |
<td class="paramtype">int </td> |
| 489 |
<td class="paramname"><em>flipy</em>, </td> |
| 490 |
</tr> |
| 491 |
<tr> |
| 492 |
<td class="paramkey"></td> |
| 493 |
<td></td> |
| 494 |
<td class="paramtype">int </td> |
| 495 |
<td class="paramname"><em>smooth</em> </td> |
| 496 |
</tr> |
| 497 |
<tr> |
| 498 |
<td></td> |
| 499 |
<td>)</td> |
| 500 |
<td></td><td></td> |
| 501 |
</tr> |
| 502 |
</table> |
| 503 |
</div> |
| 504 |
<div class="memdoc"> |
| 505 |
|
| 506 |
<p>Internal 32 bit rotozoomer with optional anti-aliasing. </p> |
| 507 |
<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> |
| 508 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 509 |
<table class="params"> |
| 510 |
<tr><td class="paramname">src</td><td>Source surface. </td></tr> |
| 511 |
<tr><td class="paramname">dst</td><td>Destination surface. </td></tr> |
| 512 |
<tr><td class="paramname">cx</td><td>Horizontal center coordinate. </td></tr> |
| 513 |
<tr><td class="paramname">cy</td><td>Vertical center coordinate. </td></tr> |
| 514 |
<tr><td class="paramname">isin</td><td>Integer version of sine of angle. </td></tr> |
| 515 |
<tr><td class="paramname">icos</td><td>Integer version of cosine of angle. </td></tr> |
| 516 |
<tr><td class="paramname">flipx</td><td>Flag indicating horizontal mirroring should be applied. </td></tr> |
| 517 |
<tr><td class="paramname">flipy</td><td>Flag indicating vertical mirroring should be applied. </td></tr> |
| 518 |
<tr><td class="paramname">smooth</td><td>Flag indicating anti-aliasing should be used. </td></tr> |
| 519 |
</table> |
| 520 |
</dd> |
| 521 |
</dl> |
| 522 |
|
| 523 |
<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00638">638</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p> |
| 524 |
|
| 525 |
</div> |
| 526 |
</div> |
| 527 |
<a class="anchor" id="a9898b12bb565c4075c2da4db4891fd81"></a> |
| 528 |
<div class="memitem"> |
| 529 |
<div class="memproto"> |
| 530 |
<table class="memname"> |
| 531 |
<tr> |
| 532 |
<td class="memname">int <a class="el" href="_s_d_l__rotozoom_8c.html#a9898b12bb565c4075c2da4db4891fd81">_zoomSurfaceRGBA</a> </td> |
| 533 |
<td>(</td> |
| 534 |
<td class="paramtype">SDL_Surface * </td> |
| 535 |
<td class="paramname"><em>src</em>, </td> |
| 536 |
</tr> |
| 537 |
<tr> |
| 538 |
<td class="paramkey"></td> |
| 539 |
<td></td> |
| 540 |
<td class="paramtype">SDL_Surface * </td> |
| 541 |
<td class="paramname"><em>dst</em>, </td> |
| 542 |
</tr> |
| 543 |
<tr> |
| 544 |
<td class="paramkey"></td> |
| 545 |
<td></td> |
| 546 |
<td class="paramtype">int </td> |
| 547 |
<td class="paramname"><em>flipx</em>, </td> |
| 548 |
</tr> |
| 549 |
<tr> |
| 550 |
<td class="paramkey"></td> |
| 551 |
<td></td> |
| 552 |
<td class="paramtype">int </td> |
| 553 |
<td class="paramname"><em>flipy</em>, </td> |
| 554 |
</tr> |
| 555 |
<tr> |
| 556 |
<td class="paramkey"></td> |
| 557 |
<td></td> |
| 558 |
<td class="paramtype">int </td> |
| 559 |
<td class="paramname"><em>smooth</em> </td> |
| 560 |
</tr> |
| 561 |
<tr> |
| 562 |
<td></td> |
| 563 |
<td>)</td> |
| 564 |
<td></td><td></td> |
| 565 |
</tr> |
| 566 |
</table> |
| 567 |
</div> |
| 568 |
<div class="memdoc"> |
| 569 |
|
| 570 |
<p>Internal 32 bit Zoomer with optional anti-aliasing by bilinear interpolation. </p> |
| 571 |
<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> |
| 572 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 573 |
<table class="params"> |
| 574 |
<tr><td class="paramname">src</td><td>The surface to zoom (input). </td></tr> |
| 575 |
<tr><td class="paramname">dst</td><td>The zoomed surface (output). </td></tr> |
| 576 |
<tr><td class="paramname">flipx</td><td>Flag indicating if the image should be horizontally flipped. </td></tr> |
| 577 |
<tr><td class="paramname">flipy</td><td>Flag indicating if the image should be vertically flipped. </td></tr> |
| 578 |
<tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr> |
| 579 |
</table> |
| 580 |
</dd> |
| 581 |
</dl> |
| 582 |
<dl class="section return"><dt>Returns:</dt><dd>0 for success or -1 for error. </dd></dl> |
| 583 |
|
| 584 |
<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00286">286</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p> |
| 585 |
|
| 586 |
</div> |
| 587 |
</div> |
| 588 |
<a class="anchor" id="acfeb5a322cbb575f105f1762d9d21c29"></a> |
| 589 |
<div class="memitem"> |
| 590 |
<div class="memproto"> |
| 591 |
<table class="memname"> |
| 592 |
<tr> |
| 593 |
<td class="memname">int <a class="el" href="_s_d_l__rotozoom_8c.html#acfeb5a322cbb575f105f1762d9d21c29">_zoomSurfaceY</a> </td> |
| 594 |
<td>(</td> |
| 595 |
<td class="paramtype">SDL_Surface * </td> |
| 596 |
<td class="paramname"><em>src</em>, </td> |
| 597 |
</tr> |
| 598 |
<tr> |
| 599 |
<td class="paramkey"></td> |
| 600 |
<td></td> |
| 601 |
<td class="paramtype">SDL_Surface * </td> |
| 602 |
<td class="paramname"><em>dst</em>, </td> |
| 603 |
</tr> |
| 604 |
<tr> |
| 605 |
<td class="paramkey"></td> |
| 606 |
<td></td> |
| 607 |
<td class="paramtype">int </td> |
| 608 |
<td class="paramname"><em>flipx</em>, </td> |
| 609 |
</tr> |
| 610 |
<tr> |
| 611 |
<td class="paramkey"></td> |
| 612 |
<td></td> |
| 613 |
<td class="paramtype">int </td> |
| 614 |
<td class="paramname"><em>flipy</em> </td> |
| 615 |
</tr> |
| 616 |
<tr> |
| 617 |
<td></td> |
| 618 |
<td>)</td> |
| 619 |
<td></td><td></td> |
| 620 |
</tr> |
| 621 |
</table> |
| 622 |
</div> |
| 623 |
<div class="memdoc"> |
| 624 |
|
| 625 |
<p>Internal 8 bit Zoomer without smoothing. </p> |
| 626 |
<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> |
| 627 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 628 |
<table class="params"> |
| 629 |
<tr><td class="paramname">src</td><td>The surface to zoom (input). </td></tr> |
| 630 |
<tr><td class="paramname">dst</td><td>The zoomed surface (output). </td></tr> |
| 631 |
<tr><td class="paramname">flipx</td><td>Flag indicating if the image should be horizontally flipped. </td></tr> |
| 632 |
<tr><td class="paramname">flipy</td><td>Flag indicating if the image should be vertically flipped.</td></tr> |
| 633 |
</table> |
| 634 |
</dd> |
| 635 |
</dl> |
| 636 |
<dl class="section return"><dt>Returns:</dt><dd>0 for success or -1 for error. </dd></dl> |
| 637 |
|
| 638 |
<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00519">519</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p> |
| 639 |
|
| 640 |
</div> |
| 641 |
</div> |
| 642 |
<a class="anchor" id="a77563d68634cb2624d4f2f0bcdc19e73"></a> |
| 643 |
<div class="memitem"> |
| 644 |
<div class="memproto"> |
| 645 |
<table class="memname"> |
| 646 |
<tr> |
| 647 |
<td class="memname">SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#ac06e9fa4fce6a1dbae45462529be581e">rotateSurface90Degrees</a> </td> |
| 648 |
<td>(</td> |
| 649 |
<td class="paramtype">SDL_Surface * </td> |
| 650 |
<td class="paramname"><em>src</em>, </td> |
| 651 |
</tr> |
| 652 |
<tr> |
| 653 |
<td class="paramkey"></td> |
| 654 |
<td></td> |
| 655 |
<td class="paramtype">int </td> |
| 656 |
<td class="paramname"><em>numClockwiseTurns</em> </td> |
| 657 |
</tr> |
| 658 |
<tr> |
| 659 |
<td></td> |
| 660 |
<td>)</td> |
| 661 |
<td></td><td></td> |
| 662 |
</tr> |
| 663 |
</table> |
| 664 |
</div> |
| 665 |
<div class="memdoc"> |
| 666 |
|
| 667 |
<p>Rotates a 32 bit surface in increments of 90 degrees. </p> |
| 668 |
<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> |
| 669 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 670 |
<table class="params"> |
| 671 |
<tr><td class="paramname">src</td><td>Source surface to rotate. </td></tr> |
| 672 |
<tr><td class="paramname">numClockwiseTurns</td><td>Number of clockwise 90 degree turns to apply to the source.</td></tr> |
| 673 |
</table> |
| 674 |
</dd> |
| 675 |
</dl> |
| 676 |
<dl class="section return"><dt>Returns:</dt><dd>The new, rotated surface; or NULL for surfaces with incorrect input format. </dd></dl> |
| 677 |
|
| 678 |
<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> |
| 679 |
|
| 680 |
</div> |
| 681 |
</div> |
| 682 |
<a class="anchor" id="a5f64ed53eeee5f2667971c857698d1e5"></a> |
| 683 |
<div class="memitem"> |
| 684 |
<div class="memproto"> |
| 685 |
<table class="memname"> |
| 686 |
<tr> |
| 687 |
<td class="memname">SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#a3cb0c11d5edc929579c807dc7612348c">rotozoomSurface</a> </td> |
| 688 |
<td>(</td> |
| 689 |
<td class="paramtype">SDL_Surface * </td> |
| 690 |
<td class="paramname"><em>src</em>, </td> |
| 691 |
</tr> |
| 692 |
<tr> |
| 693 |
<td class="paramkey"></td> |
| 694 |
<td></td> |
| 695 |
<td class="paramtype">double </td> |
| 696 |
<td class="paramname"><em>angle</em>, </td> |
| 697 |
</tr> |
| 698 |
<tr> |
| 699 |
<td class="paramkey"></td> |
| 700 |
<td></td> |
| 701 |
<td class="paramtype">double </td> |
| 702 |
<td class="paramname"><em>zoom</em>, </td> |
| 703 |
</tr> |
| 704 |
<tr> |
| 705 |
<td class="paramkey"></td> |
| 706 |
<td></td> |
| 707 |
<td class="paramtype">int </td> |
| 708 |
<td class="paramname"><em>smooth</em> </td> |
| 709 |
</tr> |
| 710 |
<tr> |
| 711 |
<td></td> |
| 712 |
<td>)</td> |
| 713 |
<td></td><td></td> |
| 714 |
</tr> |
| 715 |
</table> |
| 716 |
</div> |
| 717 |
<div class="memdoc"> |
| 718 |
|
| 719 |
<p>Rotates and zooms a surface and optional anti-aliasing. </p> |
| 720 |
<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> |
| 721 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 722 |
<table class="params"> |
| 723 |
<tr><td class="paramname">src</td><td>The surface to rotozoom. </td></tr> |
| 724 |
<tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr> |
| 725 |
<tr><td class="paramname">zoom</td><td>The scaling factor. </td></tr> |
| 726 |
<tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr> |
| 727 |
</table> |
| 728 |
</dd> |
| 729 |
</dl> |
| 730 |
<dl class="section return"><dt>Returns:</dt><dd>The new rotozoomed surface. </dd></dl> |
| 731 |
|
| 732 |
<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> |
| 733 |
|
| 734 |
</div> |
| 735 |
</div> |
| 736 |
<a class="anchor" id="a9886c783255edfd70a4974f8f3dd5a8c"></a> |
| 737 |
<div class="memitem"> |
| 738 |
<div class="memproto"> |
| 739 |
<table class="memname"> |
| 740 |
<tr> |
| 741 |
<td class="memname">void <a class="el" href="_s_d_l__rotozoom_8h.html#a3ca2316375d6faf4f19b26c2f1f14bbc">rotozoomSurfaceSize</a> </td> |
| 742 |
<td>(</td> |
| 743 |
<td class="paramtype">int </td> |
| 744 |
<td class="paramname"><em>width</em>, </td> |
| 745 |
</tr> |
| 746 |
<tr> |
| 747 |
<td class="paramkey"></td> |
| 748 |
<td></td> |
| 749 |
<td class="paramtype">int </td> |
| 750 |
<td class="paramname"><em>height</em>, </td> |
| 751 |
</tr> |
| 752 |
<tr> |
| 753 |
<td class="paramkey"></td> |
| 754 |
<td></td> |
| 755 |
<td class="paramtype">double </td> |
| 756 |
<td class="paramname"><em>angle</em>, </td> |
| 757 |
</tr> |
| 758 |
<tr> |
| 759 |
<td class="paramkey"></td> |
| 760 |
<td></td> |
| 761 |
<td class="paramtype">double </td> |
| 762 |
<td class="paramname"><em>zoom</em>, </td> |
| 763 |
</tr> |
| 764 |
<tr> |
| 765 |
<td class="paramkey"></td> |
| 766 |
<td></td> |
| 767 |
<td class="paramtype">int * </td> |
| 768 |
<td class="paramname"><em>dstwidth</em>, </td> |
| 769 |
</tr> |
| 770 |
<tr> |
| 771 |
<td class="paramkey"></td> |
| 772 |
<td></td> |
| 773 |
<td class="paramtype">int * </td> |
| 774 |
<td class="paramname"><em>dstheight</em> </td> |
| 775 |
</tr> |
| 776 |
<tr> |
| 777 |
<td></td> |
| 778 |
<td>)</td> |
| 779 |
<td></td><td></td> |
| 780 |
</tr> |
| 781 |
</table> |
| 782 |
</div> |
| 783 |
<div class="memdoc"> |
| 784 |
|
| 785 |
<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> |
| 786 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 787 |
<table class="params"> |
| 788 |
<tr><td class="paramname">width</td><td>The source surface width. </td></tr> |
| 789 |
<tr><td class="paramname">height</td><td>The source surface height. </td></tr> |
| 790 |
<tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr> |
| 791 |
<tr><td class="paramname">zoom</td><td>The scaling factor. </td></tr> |
| 792 |
<tr><td class="paramname">dstwidth</td><td>The calculated width of the rotozoomed destination surface. </td></tr> |
| 793 |
<tr><td class="paramname">dstheight</td><td>The calculated height of the rotozoomed destination surface. </td></tr> |
| 794 |
</table> |
| 795 |
</dd> |
| 796 |
</dl> |
| 797 |
|
| 798 |
<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> |
| 799 |
|
| 800 |
</div> |
| 801 |
</div> |
| 802 |
<a class="anchor" id="aee64992d26c818d9975610754d5c929b"></a> |
| 803 |
<div class="memitem"> |
| 804 |
<div class="memproto"> |
| 805 |
<table class="memname"> |
| 806 |
<tr> |
| 807 |
<td class="memname">void <a class="el" href="_s_d_l__rotozoom_8h.html#a612334fa642f672af953f544da6245d0">rotozoomSurfaceSizeXY</a> </td> |
| 808 |
<td>(</td> |
| 809 |
<td class="paramtype">int </td> |
| 810 |
<td class="paramname"><em>width</em>, </td> |
| 811 |
</tr> |
| 812 |
<tr> |
| 813 |
<td class="paramkey"></td> |
| 814 |
<td></td> |
| 815 |
<td class="paramtype">int </td> |
| 816 |
<td class="paramname"><em>height</em>, </td> |
| 817 |
</tr> |
| 818 |
<tr> |
| 819 |
<td class="paramkey"></td> |
| 820 |
<td></td> |
| 821 |
<td class="paramtype">double </td> |
| 822 |
<td class="paramname"><em>angle</em>, </td> |
| 823 |
</tr> |
| 824 |
<tr> |
| 825 |
<td class="paramkey"></td> |
| 826 |
<td></td> |
| 827 |
<td class="paramtype">double </td> |
| 828 |
<td class="paramname"><em>zoomx</em>, </td> |
| 829 |
</tr> |
| 830 |
<tr> |
| 831 |
<td class="paramkey"></td> |
| 832 |
<td></td> |
| 833 |
<td class="paramtype">double </td> |
| 834 |
<td class="paramname"><em>zoomy</em>, </td> |
| 835 |
</tr> |
| 836 |
<tr> |
| 837 |
<td class="paramkey"></td> |
| 838 |
<td></td> |
| 839 |
<td class="paramtype">int * </td> |
| 840 |
<td class="paramname"><em>dstwidth</em>, </td> |
| 841 |
</tr> |
| 842 |
<tr> |
| 843 |
<td class="paramkey"></td> |
| 844 |
<td></td> |
| 845 |
<td class="paramtype">int * </td> |
| 846 |
<td class="paramname"><em>dstheight</em> </td> |
| 847 |
</tr> |
| 848 |
<tr> |
| 849 |
<td></td> |
| 850 |
<td>)</td> |
| 851 |
<td></td><td></td> |
| 852 |
</tr> |
| 853 |
</table> |
| 854 |
</div> |
| 855 |
<div class="memdoc"> |
| 856 |
|
| 857 |
<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> |
| 858 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 859 |
<table class="params"> |
| 860 |
<tr><td class="paramname">width</td><td>The source surface width. </td></tr> |
| 861 |
<tr><td class="paramname">height</td><td>The source surface height. </td></tr> |
| 862 |
<tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr> |
| 863 |
<tr><td class="paramname">zoomx</td><td>The horizontal scaling factor. </td></tr> |
| 864 |
<tr><td class="paramname">zoomy</td><td>The vertical scaling factor. </td></tr> |
| 865 |
<tr><td class="paramname">dstwidth</td><td>The calculated width of the rotozoomed destination surface. </td></tr> |
| 866 |
<tr><td class="paramname">dstheight</td><td>The calculated height of the rotozoomed destination surface. </td></tr> |
| 867 |
</table> |
| 868 |
</dd> |
| 869 |
</dl> |
| 870 |
|
| 871 |
<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> |
| 872 |
|
| 873 |
</div> |
| 874 |
</div> |
| 875 |
<a class="anchor" id="aab98b5b0da4ea468bacf47f7b85f0ee2"></a> |
| 876 |
<div class="memitem"> |
| 877 |
<div class="memproto"> |
| 878 |
<table class="memname"> |
| 879 |
<tr> |
| 880 |
<td class="memname">SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#a454d4234a45eab6ec238a40cc44051d4">rotozoomSurfaceXY</a> </td> |
| 881 |
<td>(</td> |
| 882 |
<td class="paramtype">SDL_Surface * </td> |
| 883 |
<td class="paramname"><em>src</em>, </td> |
| 884 |
</tr> |
| 885 |
<tr> |
| 886 |
<td class="paramkey"></td> |
| 887 |
<td></td> |
| 888 |
<td class="paramtype">double </td> |
| 889 |
<td class="paramname"><em>angle</em>, </td> |
| 890 |
</tr> |
| 891 |
<tr> |
| 892 |
<td class="paramkey"></td> |
| 893 |
<td></td> |
| 894 |
<td class="paramtype">double </td> |
| 895 |
<td class="paramname"><em>zoomx</em>, </td> |
| 896 |
</tr> |
| 897 |
<tr> |
| 898 |
<td class="paramkey"></td> |
| 899 |
<td></td> |
| 900 |
<td class="paramtype">double </td> |
| 901 |
<td class="paramname"><em>zoomy</em>, </td> |
| 902 |
</tr> |
| 903 |
<tr> |
| 904 |
<td class="paramkey"></td> |
| 905 |
<td></td> |
| 906 |
<td class="paramtype">int </td> |
| 907 |
<td class="paramname"><em>smooth</em> </td> |
| 908 |
</tr> |
| 909 |
<tr> |
| 910 |
<td></td> |
| 911 |
<td>)</td> |
| 912 |
<td></td><td></td> |
| 913 |
</tr> |
| 914 |
</table> |
| 915 |
</div> |
| 916 |
<div class="memdoc"> |
| 917 |
|
| 918 |
<p>Rotates and zooms a surface with different horizontal and vertival scaling factors and optional anti-aliasing. </p> |
| 919 |
<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> |
| 920 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 921 |
<table class="params"> |
| 922 |
<tr><td class="paramname">src</td><td>The surface to rotozoom. </td></tr> |
| 923 |
<tr><td class="paramname">angle</td><td>The angle to rotate in degrees. </td></tr> |
| 924 |
<tr><td class="paramname">zoomx</td><td>The horizontal scaling factor. </td></tr> |
| 925 |
<tr><td class="paramname">zoomy</td><td>The vertical scaling factor. </td></tr> |
| 926 |
<tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr> |
| 927 |
</table> |
| 928 |
</dd> |
| 929 |
</dl> |
| 930 |
<dl class="section return"><dt>Returns:</dt><dd>The new rotozoomed surface. </dd></dl> |
| 931 |
|
| 932 |
<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> |
| 933 |
|
| 934 |
</div> |
| 935 |
</div> |
| 936 |
<a class="anchor" id="aad3bf0cd89cc39ff874ffa778fa1495d"></a> |
| 937 |
<div class="memitem"> |
| 938 |
<div class="memproto"> |
| 939 |
<table class="memname"> |
| 940 |
<tr> |
| 941 |
<td class="memname">SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#a7a7ac2cc0d79d282b5a4c76143b7e7a9">shrinkSurface</a> </td> |
| 942 |
<td>(</td> |
| 943 |
<td class="paramtype">SDL_Surface * </td> |
| 944 |
<td class="paramname"><em>src</em>, </td> |
| 945 |
</tr> |
| 946 |
<tr> |
| 947 |
<td class="paramkey"></td> |
| 948 |
<td></td> |
| 949 |
<td class="paramtype">int </td> |
| 950 |
<td class="paramname"><em>factorx</em>, </td> |
| 951 |
</tr> |
| 952 |
<tr> |
| 953 |
<td class="paramkey"></td> |
| 954 |
<td></td> |
| 955 |
<td class="paramtype">int </td> |
| 956 |
<td class="paramname"><em>factory</em> </td> |
| 957 |
</tr> |
| 958 |
<tr> |
| 959 |
<td></td> |
| 960 |
<td>)</td> |
| 961 |
<td></td><td></td> |
| 962 |
</tr> |
| 963 |
</table> |
| 964 |
</div> |
| 965 |
<div class="memdoc"> |
| 966 |
|
| 967 |
<p>Shrink a surface by an integer ratio using averaging. </p> |
| 968 |
<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> |
| 969 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 970 |
<table class="params"> |
| 971 |
<tr><td class="paramname">src</td><td>The surface to shrink. </td></tr> |
| 972 |
<tr><td class="paramname">factorx</td><td>The horizontal shrinking ratio. </td></tr> |
| 973 |
<tr><td class="paramname">factory</td><td>The vertical shrinking ratio.</td></tr> |
| 974 |
</table> |
| 975 |
</dd> |
| 976 |
</dl> |
| 977 |
<dl class="section return"><dt>Returns:</dt><dd>The new, shrunken surface. </dd></dl> |
| 978 |
|
| 979 |
<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> |
| 980 |
|
| 981 |
</div> |
| 982 |
</div> |
| 983 |
<a class="anchor" id="a126e3b96b22cc18e78e33cc1f8eb6c3c"></a> |
| 984 |
<div class="memitem"> |
| 985 |
<div class="memproto"> |
| 986 |
<table class="memname"> |
| 987 |
<tr> |
| 988 |
<td class="memname">void <a class="el" href="_s_d_l__rotozoom_8c.html#a126e3b96b22cc18e78e33cc1f8eb6c3c">transformSurfaceY</a> </td> |
| 989 |
<td>(</td> |
| 990 |
<td class="paramtype">SDL_Surface * </td> |
| 991 |
<td class="paramname"><em>src</em>, </td> |
| 992 |
</tr> |
| 993 |
<tr> |
| 994 |
<td class="paramkey"></td> |
| 995 |
<td></td> |
| 996 |
<td class="paramtype">SDL_Surface * </td> |
| 997 |
<td class="paramname"><em>dst</em>, </td> |
| 998 |
</tr> |
| 999 |
<tr> |
| 1000 |
<td class="paramkey"></td> |
| 1001 |
<td></td> |
| 1002 |
<td class="paramtype">int </td> |
| 1003 |
<td class="paramname"><em>cx</em>, </td> |
| 1004 |
</tr> |
| 1005 |
<tr> |
| 1006 |
<td class="paramkey"></td> |
| 1007 |
<td></td> |
| 1008 |
<td class="paramtype">int </td> |
| 1009 |
<td class="paramname"><em>cy</em>, </td> |
| 1010 |
</tr> |
| 1011 |
<tr> |
| 1012 |
<td class="paramkey"></td> |
| 1013 |
<td></td> |
| 1014 |
<td class="paramtype">int </td> |
| 1015 |
<td class="paramname"><em>isin</em>, </td> |
| 1016 |
</tr> |
| 1017 |
<tr> |
| 1018 |
<td class="paramkey"></td> |
| 1019 |
<td></td> |
| 1020 |
<td class="paramtype">int </td> |
| 1021 |
<td class="paramname"><em>icos</em>, </td> |
| 1022 |
</tr> |
| 1023 |
<tr> |
| 1024 |
<td class="paramkey"></td> |
| 1025 |
<td></td> |
| 1026 |
<td class="paramtype">int </td> |
| 1027 |
<td class="paramname"><em>flipx</em>, </td> |
| 1028 |
</tr> |
| 1029 |
<tr> |
| 1030 |
<td class="paramkey"></td> |
| 1031 |
<td></td> |
| 1032 |
<td class="paramtype">int </td> |
| 1033 |
<td class="paramname"><em>flipy</em> </td> |
| 1034 |
</tr> |
| 1035 |
<tr> |
| 1036 |
<td></td> |
| 1037 |
<td>)</td> |
| 1038 |
<td></td><td></td> |
| 1039 |
</tr> |
| 1040 |
</table> |
| 1041 |
</div> |
| 1042 |
<div class="memdoc"> |
| 1043 |
|
| 1044 |
<p>Rotates and zooms 8 bit palette/Y 'src' surface to 'dst' surface without smoothing. </p> |
| 1045 |
<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> |
| 1046 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 1047 |
<table class="params"> |
| 1048 |
<tr><td class="paramname">src</td><td>Source surface. </td></tr> |
| 1049 |
<tr><td class="paramname">dst</td><td>Destination surface. </td></tr> |
| 1050 |
<tr><td class="paramname">cx</td><td>Horizontal center coordinate. </td></tr> |
| 1051 |
<tr><td class="paramname">cy</td><td>Vertical center coordinate. </td></tr> |
| 1052 |
<tr><td class="paramname">isin</td><td>Integer version of sine of angle. </td></tr> |
| 1053 |
<tr><td class="paramname">icos</td><td>Integer version of cosine of angle. </td></tr> |
| 1054 |
<tr><td class="paramname">flipx</td><td>Flag indicating horizontal mirroring should be applied. </td></tr> |
| 1055 |
<tr><td class="paramname">flipy</td><td>Flag indicating vertical mirroring should be applied. </td></tr> |
| 1056 |
</table> |
| 1057 |
</dd> |
| 1058 |
</dl> |
| 1059 |
|
| 1060 |
<p>Definition at line <a class="el" href="_s_d_l__rotozoom_8c_source.html#l00755">755</a> of file <a class="el" href="_s_d_l__rotozoom_8c_source.html">SDL_rotozoom.c</a>.</p> |
| 1061 |
|
| 1062 |
</div> |
| 1063 |
</div> |
| 1064 |
<a class="anchor" id="abdd772b2f6b1f26134e4e90cda657a21"></a> |
| 1065 |
<div class="memitem"> |
| 1066 |
<div class="memproto"> |
| 1067 |
<table class="memname"> |
| 1068 |
<tr> |
| 1069 |
<td class="memname">SDL_Surface* <a class="el" href="_s_d_l__rotozoom_8h.html#a06c8108f8fe8de77cf841c176ee64850">zoomSurface</a> </td> |
| 1070 |
<td>(</td> |
| 1071 |
<td class="paramtype">SDL_Surface * </td> |
| 1072 |
<td class="paramname"><em>src</em>, </td> |
| 1073 |
</tr> |
| 1074 |
<tr> |
| 1075 |
<td class="paramkey"></td> |
| 1076 |
<td></td> |
| 1077 |
<td class="paramtype">double </td> |
| 1078 |
<td class="paramname"><em>zoomx</em>, </td> |
| 1079 |
</tr> |
| 1080 |
<tr> |
| 1081 |
<td class="paramkey"></td> |
| 1082 |
<td></td> |
| 1083 |
<td class="paramtype">double </td> |
| 1084 |
<td class="paramname"><em>zoomy</em>, </td> |
| 1085 |
</tr> |
| 1086 |
<tr> |
| 1087 |
<td class="paramkey"></td> |
| 1088 |
<td></td> |
| 1089 |
<td class="paramtype">int </td> |
| 1090 |
<td class="paramname"><em>smooth</em> </td> |
| 1091 |
</tr> |
| 1092 |
<tr> |
| 1093 |
<td></td> |
| 1094 |
<td>)</td> |
| 1095 |
<td></td><td></td> |
| 1096 |
</tr> |
| 1097 |
</table> |
| 1098 |
</div> |
| 1099 |
<div class="memdoc"> |
| 1100 |
|
| 1101 |
<p>Zoom a surface by independent horizontal and vertical factors with optional smoothing. </p> |
| 1102 |
<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> |
| 1103 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 1104 |
<table class="params"> |
| 1105 |
<tr><td class="paramname">src</td><td>The surface to zoom. </td></tr> |
| 1106 |
<tr><td class="paramname">zoomx</td><td>The horizontal zoom factor. </td></tr> |
| 1107 |
<tr><td class="paramname">zoomy</td><td>The vertical zoom factor. </td></tr> |
| 1108 |
<tr><td class="paramname">smooth</td><td>Antialiasing flag; set to SMOOTHING_ON to enable.</td></tr> |
| 1109 |
</table> |
| 1110 |
</dd> |
| 1111 |
</dl> |
| 1112 |
<dl class="section return"><dt>Returns:</dt><dd>The new, zoomed surface. </dd></dl> |
| 1113 |
|
| 1114 |
<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> |
| 1115 |
|
| 1116 |
</div> |
| 1117 |
</div> |
| 1118 |
<a class="anchor" id="a8ba40859c1a977dae87488dd8be1bf9a"></a> |
| 1119 |
<div class="memitem"> |
| 1120 |
<div class="memproto"> |
| 1121 |
<table class="memname"> |
| 1122 |
<tr> |
| 1123 |
<td class="memname">void <a class="el" href="_s_d_l__rotozoom_8h.html#a7927e415d87ea7856794cd4cc77e0a25">zoomSurfaceSize</a> </td> |
| 1124 |
<td>(</td> |
| 1125 |
<td class="paramtype">int </td> |
| 1126 |
<td class="paramname"><em>width</em>, </td> |
| 1127 |
</tr> |
| 1128 |
<tr> |
| 1129 |
<td class="paramkey"></td> |
| 1130 |
<td></td> |
| 1131 |
<td class="paramtype">int </td> |
| 1132 |
<td class="paramname"><em>height</em>, </td> |
| 1133 |
</tr> |
| 1134 |
<tr> |
| 1135 |
<td class="paramkey"></td> |
| 1136 |
<td></td> |
| 1137 |
<td class="paramtype">double </td> |
| 1138 |
<td class="paramname"><em>zoomx</em>, </td> |
| 1139 |
</tr> |
| 1140 |
<tr> |
| 1141 |
<td class="paramkey"></td> |
| 1142 |
<td></td> |
| 1143 |
<td class="paramtype">double </td> |
| 1144 |
<td class="paramname"><em>zoomy</em>, </td> |
| 1145 |
</tr> |
| 1146 |
<tr> |
| 1147 |
<td class="paramkey"></td> |
| 1148 |
<td></td> |
| 1149 |
<td class="paramtype">int * </td> |
| 1150 |
<td class="paramname"><em>dstwidth</em>, </td> |
| 1151 |
</tr> |
| 1152 |
<tr> |
| 1153 |
<td class="paramkey"></td> |
| 1154 |
<td></td> |
| 1155 |
<td class="paramtype">int * </td> |
| 1156 |
<td class="paramname"><em>dstheight</em> </td> |
| 1157 |
</tr> |
| 1158 |
<tr> |
| 1159 |
<td></td> |
| 1160 |
<td>)</td> |
| 1161 |
<td></td><td></td> |
| 1162 |
</tr> |
| 1163 |
</table> |
| 1164 |
</div> |
| 1165 |
<div class="memdoc"> |
| 1166 |
|
| 1167 |
<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> |
| 1168 |
<p>The minimum size of the target surface is 1. The input factors can be positive or negative.</p> |
| 1169 |
<dl class="params"><dt><b>Parameters:</b></dt><dd> |
| 1170 |
<table class="params"> |
| 1171 |
<tr><td class="paramname">width</td><td>The width of the source surface to zoom. </td></tr> |
| 1172 |
<tr><td class="paramname">height</td><td>The height of the source surface to zoom. </td></tr> |
| 1173 |
<tr><td class="paramname">zoomx</td><td>The horizontal zoom factor. </td></tr> |
| 1174 |
<tr><td class="paramname">zoomy</td><td>The vertical zoom factor. </td></tr> |
| 1175 |
<tr><td class="paramname">dstwidth</td><td>Pointer to an integer to store the calculated width of the zoomed target surface. </td></tr> |
| 1176 |
<tr><td class="paramname">dstheight</td><td>Pointer to an integer to store the calculated height of the zoomed target surface. </td></tr> |
| 1177 |
</table> |
| 1178 |
</dd> |
| 1179 |
</dl> |
| 1180 |
|
| 1181 |
<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> |
| 1182 |
|
| 1183 |
</div> |
| 1184 |
</div> |
| 1185 |
</div><!-- contents --> |
| 1186 |
|
| 1187 |
|
| 1188 |
<hr class="footer"/><address class="footer"><small> |
| 1189 |
Generated by  <a href="http://www.doxygen.org/index.html"> |
| 1190 |
<img class="footer" src="doxygen.png" alt="doxygen"/> |
| 1191 |
</a> 1.8.0 |
| 1192 |
</small></address> |
| 1193 |
|
| 1194 |
</body> |
| 1195 |
</html> |