<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.15"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <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/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></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 id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">My Project </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.15 --> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search'); /* @license-end */ </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); /* @license-end */</script> <div id="main-nav"></div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </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 (integer) <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__FPoint.html">SDL_FPoint</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The structure that defines a point (floating point) <a href="structSDL__FPoint.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 (integer). <a href="structSDL__Rect.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__FRect.html">SDL_FRect</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">A rectangle, with the origin at the upper left (floating point). <a href="structSDL__FRect.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 (integer) <a href="#a61e81ca749549bf3b896e6d09f6c0dad">More...</a><br /></td></tr> <tr class="separator:a61e81ca749549bf3b896e6d09f6c0dad"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a758ff5c0cedab26602d42bb8fbd83fef"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structSDL__FPoint.html">SDL_FPoint</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="SDL__rect_8h.html#a758ff5c0cedab26602d42bb8fbd83fef">SDL_FPoint</a></td></tr> <tr class="memdesc:a758ff5c0cedab26602d42bb8fbd83fef"><td class="mdescLeft"> </td><td class="mdescRight">The structure that defines a point (floating point) <a href="#a758ff5c0cedab26602d42bb8fbd83fef">More...</a><br /></td></tr> <tr class="separator:a758ff5c0cedab26602d42bb8fbd83fef"><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 (integer). <a href="#ab9e65f8131b4e7faad18d498e7dbde8c">More...</a><br /></td></tr> <tr class="separator:ab9e65f8131b4e7faad18d498e7dbde8c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a1b210e51ef78173674cdcb8651ea705e"><td class="memItemLeft" align="right" valign="top"><a id="a1b210e51ef78173674cdcb8651ea705e"></a> typedef struct <a class="el" href="structSDL__FRect.html">SDL_FRect</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="SDL__rect_8h.html#a1b210e51ef78173674cdcb8651ea705e">SDL_FRect</a></td></tr> <tr class="memdesc:a1b210e51ef78173674cdcb8651ea705e"><td class="mdescLeft"> </td><td class="mdescRight">A rectangle, with the origin at the upper left (floating point). <br /></td></tr> <tr class="separator:a1b210e51ef78173674cdcb8651ea705e"><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:a2f9708f2739ef234c34e6feda50b4d2c"><td class="memItemLeft" align="right" valign="top"><a id="a2f9708f2739ef234c34e6feda50b4d2c"></a> SDL_FORCE_INLINE SDL_bool </td><td class="memItemRight" valign="bottom"><a class="el" href="SDL__rect_8h.html#a2f9708f2739ef234c34e6feda50b4d2c">SDL_PointInRect</a> (const <a class="el" href="structSDL__Point.html">SDL_Point</a> *p, const <a class="el" href="structSDL__Rect.html">SDL_Rect</a> *r)</td></tr> <tr class="memdesc:a2f9708f2739ef234c34e6feda50b4d2c"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if point resides inside a rectangle. <br /></td></tr> <tr class="separator:a2f9708f2739ef234c34e6feda50b4d2c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aac0e9b5d3f34baec6a2cde95bb01f49c"><td class="memItemLeft" align="right" valign="top"><a 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 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 id="a659f2c25335202888408c95195823f9c"></a> DECLSPEC void 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, int 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, int *X1, int *Y1, int *X2, int *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 id="a758ff5c0cedab26602d42bb8fbd83fef"></a> <h2 class="memtitle"><span class="permalink"><a href="#a758ff5c0cedab26602d42bb8fbd83fef">◆ </a></span>SDL_FPoint</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef struct <a class="el" href="structSDL__FPoint.html">SDL_FPoint</a> <a class="el" href="structSDL__FPoint.html">SDL_FPoint</a></td> </tr> </table> </div><div class="memdoc"> <p>The structure that defines a point (floating 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> <dd> <a class="el" href="SDL__rect_8h.html#a2f9708f2739ef234c34e6feda50b4d2c" title="Returns true if point resides inside a rectangle.">SDL_PointInRect</a> </dd></dl> </div> </div> <a id="a61e81ca749549bf3b896e6d09f6c0dad"></a> <h2 class="memtitle"><span class="permalink"><a href="#a61e81ca749549bf3b896e6d09f6c0dad">◆ </a></span>SDL_Point</h2> <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 (integer) </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> <dd> <a class="el" href="SDL__rect_8h.html#a2f9708f2739ef234c34e6feda50b4d2c" title="Returns true if point resides inside a rectangle.">SDL_PointInRect</a> </dd></dl> </div> </div> <a id="ab9e65f8131b4e7faad18d498e7dbde8c"></a> <h2 class="memtitle"><span class="permalink"><a href="#ab9e65f8131b4e7faad18d498e7dbde8c">◆ </a></span>SDL_Rect</h2> <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 (integer). </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 id="afcbb58dbba760b9e6fdb4b5d1ece015c"></a> <h2 class="memtitle"><span class="permalink"><a href="#afcbb58dbba760b9e6fdb4b5d1ece015c">◆ </a></span>SDL_EnclosePoints()</h2> <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">int </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 id="a191ec0b069421d4a36304b475697e847"></a> <h2 class="memtitle"><span class="permalink"><a href="#a191ec0b069421d4a36304b475697e847">◆ </a></span>SDL_HasIntersection()</h2> <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 id="aff8e3dd3b1a25443cd7c8cf02a087290"></a> <h2 class="memtitle"><span class="permalink"><a href="#aff8e3dd3b1a25443cd7c8cf02a087290">◆ </a></span>SDL_IntersectRect()</h2> <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 id="acdabdcbeb7b7083f94a092daa26ce069"></a> <h2 class="memtitle"><span class="permalink"><a href="#acdabdcbeb7b7083f94a092daa26ce069">◆ </a></span>SDL_IntersectRectAndLine()</h2> <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">int * </td> <td class="paramname"><em>X1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"><em>Y1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </td> <td class="paramname"><em>X2</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int * </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 by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.15 </small></address> </body> </html>