<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>AlbumShaper: tilt_internal.h Source File</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.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="annotated.html"><span>Classes</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 List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <h1>tilt_internal.h</h1><a href="tilt__internal_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//==============================================</span> <a name="l00002"></a>00002 <span class="comment">// copyright : (C) 2003-2005 by Will Stokes</span> <a name="l00003"></a>00003 <span class="comment">//==============================================</span> <a name="l00004"></a>00004 <span class="comment">// This program is free software; you can redistribute it</span> <a name="l00005"></a>00005 <span class="comment">// and/or modify it under the terms of the GNU General</span> <a name="l00006"></a>00006 <span class="comment">// Public License as published by the Free Software</span> <a name="l00007"></a>00007 <span class="comment">// Foundation; either version 2 of the License, or</span> <a name="l00008"></a>00008 <span class="comment">// (at your option) any later version.</span> <a name="l00009"></a>00009 <span class="comment">//==============================================</span> <a name="l00010"></a>00010 <a name="l00011"></a>00011 <span class="preprocessor">#ifndef BACKEND_ENHANCEMENTS_TILT_INTERNAL_H</span> <a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define BACKEND_ENHANCEMENTS_TILT_INTERNAL_H</span> <a name="l00013"></a>00013 <span class="preprocessor"></span> <a name="l00014"></a>00014 <span class="comment">//In orded to prevent roundoff error from propogating</span> <a name="l00015"></a>00015 <span class="comment">//across multiple pixel computations I've created</span> <a name="l00016"></a>00016 <span class="comment">//my own DPoint class that resembles a QPoint but uses doubles instead.</span> <a name="l00017"></a><a class="code" href="classDPoint.html">00017</a> <span class="keyword">class </span><a class="code" href="classDPoint.html">DPoint</a> <a name="l00018"></a>00018 { <a name="l00019"></a>00019 <span class="keyword">public</span>: <a name="l00020"></a>00020 <a class="code" href="classDPoint.html#761b61bb76bc69b33c799d7cbf7568f4">DPoint</a>(); <a name="l00021"></a>00021 <a class="code" href="classDPoint.html#761b61bb76bc69b33c799d7cbf7568f4">DPoint</a>( <span class="keywordtype">double</span> <a class="code" href="classDPoint.html#77c659dcf610ea320fd46ab7bf338851">x</a>, <span class="keywordtype">double</span> <a class="code" href="classDPoint.html#fefa46a0d128b45349fe6b05526205ad">y</a> ); <a name="l00022"></a>00022 <span class="keywordtype">double</span> <a class="code" href="classDPoint.html#77c659dcf610ea320fd46ab7bf338851">x</a>() <span class="keyword">const</span>; <a name="l00023"></a>00023 <span class="keywordtype">double</span> <a class="code" href="classDPoint.html#fefa46a0d128b45349fe6b05526205ad">y</a>() <span class="keyword">const</span>; <a name="l00024"></a>00024 <span class="keyword">private</span>: <a name="l00025"></a><a class="code" href="classDPoint.html#65761a5432a3e9ed011752f3ae70b9c7">00025</a> <span class="keywordtype">double</span> <a class="code" href="classDPoint.html#85595342347f5756d820bed59079c679">xpos</a>, <a class="code" href="classDPoint.html#65761a5432a3e9ed011752f3ae70b9c7">ypos</a>; <a name="l00026"></a>00026 }; <a name="l00027"></a>00027 <a name="l00028"></a>00028 <span class="comment">//finds the 2-dimensionally interpolated pixel color</span> <a name="l00029"></a>00029 <span class="comment">//using the supplied double coordinates and image object</span> <a name="l00030"></a>00030 QRgb <a class="code" href="tilt_8cpp.html#3f1d83198a2abb32c2a9e8c7bfb4772e">interpolatedPixelValue</a>( <span class="keywordtype">double</span> xp, <span class="keywordtype">double</span> yp, QImage* image ); <a name="l00031"></a>00031 <a name="l00032"></a>00032 <span class="comment">//blends two rgb colors using a weight between 0-1, used by interpolate function</span> <a name="l00033"></a>00033 QRgb <a class="code" href="tilt_8cpp.html#fff3aa2df7d0a8ed1d7f5929e34eed60">blendColors</a>( QRgb color1, QRgb color2, <span class="keywordtype">double</span> alpha ); <a name="l00034"></a>00034 <a name="l00035"></a>00035 <span class="comment">//finds the intersection between two lines described by p1-p2 and p3-p4</span> <a name="l00036"></a>00036 <a class="code" href="classDPoint.html">DPoint</a> <a class="code" href="tilt_8cpp.html#64cdd4694c2d057ef599ab1360ff62c1">findTwoLineIntersection</a>(<a class="code" href="classDPoint.html">DPoint</a> p1, <a class="code" href="classDPoint.html">DPoint</a> p2, <a class="code" href="classDPoint.html">DPoint</a> p3, <a class="code" href="classDPoint.html">DPoint</a> p4); <a name="l00037"></a>00037 <a name="l00038"></a>00038 <span class="preprocessor">#endif //BACKEND_ENHANCEMENTS_TILT_INTERNAL_H</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Sun Aug 23 02:34:28 2009 for AlbumShaper by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> </body> </html>