<!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"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.8"/> <title>My Project: SDL_rect.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">My Project </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.8 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</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> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Pages</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#nested-classes">Classes</a> | <a href="#typedef-members">Typedefs</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">SDL_rect.h File Reference</div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><code>#include "<a class="el" href="SDL__stdinc_8h_source.html">SDL_stdinc.h</a>"</code><br /> <code>#include "<a class="el" href="SDL__error_8h_source.html">SDL_error.h</a>"</code><br /> <code>#include "<a class="el" href="SDL__pixels_8h_source.html">SDL_pixels.h</a>"</code><br /> <code>#include "<a class="el" href="SDL__rwops_8h_source.html">SDL_rwops.h</a>"</code><br /> <code>#include "<a class="el" href="begin__code_8h_source.html">begin_code.h</a>"</code><br /> <code>#include "<a class="el" href="close__code_8h_source.html">close_code.h</a>"</code><br /> </div> <p><a href="SDL__rect_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> Classes</h2></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structSDL__Point.html">SDL_Point</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The structure that defines a point. <a href="structSDL__Point.html#details">More...</a><br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structSDL__Rect.html">SDL_Rect</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A rectangle, with the origin at the upper left. <a href="structSDL__Rect.html#details">More...</a><br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> Typedefs</h2></td></tr> <tr class="memitem:a61e81ca749549bf3b896e6d09f6c0dad"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structSDL__Point.html">SDL_Point</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="SDL__rect_8h.html#a61e81ca749549bf3b896e6d09f6c0dad">SDL_Point</a></td></tr> <tr class="memdesc:a61e81ca749549bf3b896e6d09f6c0dad"><td class="mdescLeft"> </td><td class="mdescRight">The structure that defines a point. <a href="#a61e81ca749549bf3b896e6d09f6c0dad">More...</a><br /></td></tr> <tr class="separator:a61e81ca749549bf3b896e6d09f6c0dad"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab9e65f8131b4e7faad18d498e7dbde8c"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structSDL__Rect.html">SDL_Rect</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="SDL__rect_8h.html#ab9e65f8131b4e7faad18d498e7dbde8c">SDL_Rect</a></td></tr> <tr class="memdesc:ab9e65f8131b4e7faad18d498e7dbde8c"><td class="mdescLeft"> </td><td class="mdescRight">A rectangle, with the origin at the upper left. <a href="#ab9e65f8131b4e7faad18d498e7dbde8c">More...</a><br /></td></tr> <tr class="separator:ab9e65f8131b4e7faad18d498e7dbde8c"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:aac0e9b5d3f34baec6a2cde95bb01f49c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aac0e9b5d3f34baec6a2cde95bb01f49c"></a> SDL_FORCE_INLINE SDL_bool </td><td class="memItemRight" valign="bottom"><a class="el" href="SDL__rect_8h.html#aac0e9b5d3f34baec6a2cde95bb01f49c">SDL_RectEmpty</a> (const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *r)</td></tr> <tr class="memdesc:aac0e9b5d3f34baec6a2cde95bb01f49c"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the rectangle has no area. <br /></td></tr> <tr class="separator:aac0e9b5d3f34baec6a2cde95bb01f49c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a156979fd3561cf90b87741d11057262a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a156979fd3561cf90b87741d11057262a"></a> SDL_FORCE_INLINE SDL_bool </td><td class="memItemRight" valign="bottom"><a class="el" href="SDL__rect_8h.html#a156979fd3561cf90b87741d11057262a">SDL_RectEquals</a> (const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *a, const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *b)</td></tr> <tr class="memdesc:a156979fd3561cf90b87741d11057262a"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the two rectangles are equal. <br /></td></tr> <tr class="separator:a156979fd3561cf90b87741d11057262a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a191ec0b069421d4a36304b475697e847"><td class="memItemLeft" align="right" valign="top">DECLSPEC SDL_bool SDLCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="SDL__rect_8h.html#a191ec0b069421d4a36304b475697e847">SDL_HasIntersection</a> (const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *A, const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *B)</td></tr> <tr class="memdesc:a191ec0b069421d4a36304b475697e847"><td class="mdescLeft"> </td><td class="mdescRight">Determine whether two rectangles intersect. <a href="#a191ec0b069421d4a36304b475697e847">More...</a><br /></td></tr> <tr class="separator:a191ec0b069421d4a36304b475697e847"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aff8e3dd3b1a25443cd7c8cf02a087290"><td class="memItemLeft" align="right" valign="top">DECLSPEC SDL_bool SDLCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="SDL__rect_8h.html#aff8e3dd3b1a25443cd7c8cf02a087290">SDL_IntersectRect</a> (const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *A, const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *B, <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *result)</td></tr> <tr class="memdesc:aff8e3dd3b1a25443cd7c8cf02a087290"><td class="mdescLeft"> </td><td class="mdescRight">Calculate the intersection of two rectangles. <a href="#aff8e3dd3b1a25443cd7c8cf02a087290">More...</a><br /></td></tr> <tr class="separator:aff8e3dd3b1a25443cd7c8cf02a087290"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a659f2c25335202888408c95195823f9c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a659f2c25335202888408c95195823f9c"></a> DECLSPEC <a class="el" href="SDL__audio_8h.html#a52835ae37c4bb905b903cbaf5d04b05f">void</a> SDLCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="SDL__rect_8h.html#a659f2c25335202888408c95195823f9c">SDL_UnionRect</a> (const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *A, const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *B, <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *result)</td></tr> <tr class="memdesc:a659f2c25335202888408c95195823f9c"><td class="mdescLeft"> </td><td class="mdescRight">Calculate the union of two rectangles. <br /></td></tr> <tr class="separator:a659f2c25335202888408c95195823f9c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:afcbb58dbba760b9e6fdb4b5d1ece015c"><td class="memItemLeft" align="right" valign="top">DECLSPEC SDL_bool SDLCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="SDL__rect_8h.html#afcbb58dbba760b9e6fdb4b5d1ece015c">SDL_EnclosePoints</a> (const <a class="el" href="structSDL__Point.html">SDL_Point</a> *points, <a class="el" href="SDL__thread_8h.html#a6a64f9be4433e4de6e2f2f548cf3c08e">int</a> count, const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *clip, <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *result)</td></tr> <tr class="memdesc:afcbb58dbba760b9e6fdb4b5d1ece015c"><td class="mdescLeft"> </td><td class="mdescRight">Calculate a minimal rectangle enclosing a set of points. <a href="#afcbb58dbba760b9e6fdb4b5d1ece015c">More...</a><br /></td></tr> <tr class="separator:afcbb58dbba760b9e6fdb4b5d1ece015c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:acdabdcbeb7b7083f94a092daa26ce069"><td class="memItemLeft" align="right" valign="top">DECLSPEC SDL_bool SDLCALL </td><td class="memItemRight" valign="bottom"><a class="el" href="SDL__rect_8h.html#acdabdcbeb7b7083f94a092daa26ce069">SDL_IntersectRectAndLine</a> (const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *rect, <a class="el" href="SDL__thread_8h.html#a6a64f9be4433e4de6e2f2f548cf3c08e">int</a> *X1, <a class="el" href="SDL__thread_8h.html#a6a64f9be4433e4de6e2f2f548cf3c08e">int</a> *Y1, <a class="el" href="SDL__thread_8h.html#a6a64f9be4433e4de6e2f2f548cf3c08e">int</a> *X2, <a class="el" href="SDL__thread_8h.html#a6a64f9be4433e4de6e2f2f548cf3c08e">int</a> *Y2)</td></tr> <tr class="memdesc:acdabdcbeb7b7083f94a092daa26ce069"><td class="mdescLeft"> </td><td class="mdescRight">Calculate the intersection of a rectangle and line segment. <a href="#acdabdcbeb7b7083f94a092daa26ce069">More...</a><br /></td></tr> <tr class="separator:acdabdcbeb7b7083f94a092daa26ce069"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Header file for SDL_rect definition and management functions. </p> </div><h2 class="groupheader">Typedef Documentation</h2> <a class="anchor" id="a61e81ca749549bf3b896e6d09f6c0dad"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef struct <a class="el" href="structSDL__Point.html">SDL_Point</a> <a class="el" href="structSDL__Point.html">SDL_Point</a></td> </tr> </table> </div><div class="memdoc"> <p>The structure that defines a point. </p> <dl class="section see"><dt>See also</dt><dd><a class="el" href="SDL__rect_8h.html#afcbb58dbba760b9e6fdb4b5d1ece015c" title="Calculate a minimal rectangle enclosing a set of points. ">SDL_EnclosePoints</a> </dd></dl> </div> </div> <a class="anchor" id="ab9e65f8131b4e7faad18d498e7dbde8c"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef struct <a class="el" href="structSDL__Rect.html">SDL_Rect</a> <a class="el" href="structSDL__Rect.html">SDL_Rect</a></td> </tr> </table> </div><div class="memdoc"> <p>A rectangle, with the origin at the upper left. </p> <dl class="section see"><dt>See also</dt><dd><a class="el" href="SDL__rect_8h.html#aac0e9b5d3f34baec6a2cde95bb01f49c" title="Returns true if the rectangle has no area. ">SDL_RectEmpty</a> </dd> <dd> <a class="el" href="SDL__rect_8h.html#a156979fd3561cf90b87741d11057262a" title="Returns true if the two rectangles are equal. ">SDL_RectEquals</a> </dd> <dd> <a class="el" href="SDL__rect_8h.html#a191ec0b069421d4a36304b475697e847" title="Determine whether two rectangles intersect. ">SDL_HasIntersection</a> </dd> <dd> <a class="el" href="SDL__rect_8h.html#aff8e3dd3b1a25443cd7c8cf02a087290" title="Calculate the intersection of two rectangles. ">SDL_IntersectRect</a> </dd> <dd> <a class="el" href="SDL__rect_8h.html#a659f2c25335202888408c95195823f9c" title="Calculate the union of two rectangles. ">SDL_UnionRect</a> </dd> <dd> <a class="el" href="SDL__rect_8h.html#afcbb58dbba760b9e6fdb4b5d1ece015c" title="Calculate a minimal rectangle enclosing a set of points. ">SDL_EnclosePoints</a> </dd></dl> </div> </div> <h2 class="groupheader">Function Documentation</h2> <a class="anchor" id="afcbb58dbba760b9e6fdb4b5d1ece015c"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DECLSPEC SDL_bool SDLCALL SDL_EnclosePoints </td> <td>(</td> <td class="paramtype">const <a class="el" href="structSDL__Point.html">SDL_Point</a> * </td> <td class="paramname"><em>points</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="SDL__thread_8h.html#a6a64f9be4433e4de6e2f2f548cf3c08e">int</a> </td> <td class="paramname"><em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> * </td> <td class="paramname"><em>clip</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structSDL__Rect.html">SDL_Rect</a> * </td> <td class="paramname"><em>result</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Calculate a minimal rectangle enclosing a set of points. </p> <dl class="section return"><dt>Returns</dt><dd>SDL_TRUE if any points were within the clipping rect </dd></dl> </div> </div> <a class="anchor" id="a191ec0b069421d4a36304b475697e847"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DECLSPEC SDL_bool SDLCALL SDL_HasIntersection </td> <td>(</td> <td class="paramtype">const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> * </td> <td class="paramname"><em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> * </td> <td class="paramname"><em>B</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Determine whether two rectangles intersect. </p> <dl class="section return"><dt>Returns</dt><dd>SDL_TRUE if there is an intersection, SDL_FALSE otherwise. </dd></dl> </div> </div> <a class="anchor" id="aff8e3dd3b1a25443cd7c8cf02a087290"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DECLSPEC SDL_bool SDLCALL SDL_IntersectRect </td> <td>(</td> <td class="paramtype">const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> * </td> <td class="paramname"><em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> * </td> <td class="paramname"><em>B</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structSDL__Rect.html">SDL_Rect</a> * </td> <td class="paramname"><em>result</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Calculate the intersection of two rectangles. </p> <dl class="section return"><dt>Returns</dt><dd>SDL_TRUE if there is an intersection, SDL_FALSE otherwise. </dd></dl> </div> </div> <a class="anchor" id="acdabdcbeb7b7083f94a092daa26ce069"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine </td> <td>(</td> <td class="paramtype">const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> * </td> <td class="paramname"><em>rect</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="SDL__thread_8h.html#a6a64f9be4433e4de6e2f2f548cf3c08e">int</a> * </td> <td class="paramname"><em>X1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="SDL__thread_8h.html#a6a64f9be4433e4de6e2f2f548cf3c08e">int</a> * </td> <td class="paramname"><em>Y1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="SDL__thread_8h.html#a6a64f9be4433e4de6e2f2f548cf3c08e">int</a> * </td> <td class="paramname"><em>X2</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="SDL__thread_8h.html#a6a64f9be4433e4de6e2f2f548cf3c08e">int</a> * </td> <td class="paramname"><em>Y2</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Calculate the intersection of a rectangle and line segment. </p> <dl class="section return"><dt>Returns</dt><dd>SDL_TRUE if there is an intersection, SDL_FALSE otherwise. </dd></dl> </div> </div> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Thu Oct 16 2014 16:33:09 for My Project by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.8 </small></address> </body> </html>