⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__rect__fns.htm

📁 MINIGUI1.6开发API
💻 HTM
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>MiniGUI V1.6.10 API Reference: Rectangle operations</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="index.htm">Main&nbsp;Page</a> | <a class="qindex" href="modules.htm">Modules</a> | <a class="qindex" href="classes.htm">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.htm">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.htm">Directories</a> | <a class="qindex" href="files.htm">File&nbsp;List</a> | <a class="qindex" href="functions.htm">Data&nbsp;Fields</a> | <a class="qindex" href="globals.htm">Globals</a> | <a class="qindex" href="pages.htm">Related&nbsp;Pages</a></div><h1>Rectangle operations<br><small>[<a class="el" href="group__gdi__fns.htm">GDI functions</a>]</small></h1><h2>Defines</h2><ul><li>#define <a class="el" href="group__rect__fns.htm#ga16">RECTWP</a>(prc)&nbsp;&nbsp;&nbsp;(prc-&gt;right - prc-&gt;left)<dl class="el"><dd class="mdescRight">Gets the width of a RECT object by using the pointer to it.  <a href="#ga16"></a><br></dl><li>#define <a class="el" href="group__rect__fns.htm#ga17">RECTHP</a>(prc)&nbsp;&nbsp;&nbsp;(prc-&gt;bottom - prc-&gt;top)<dl class="el"><dd class="mdescRight">Gets the height of a RECT object by using the pointer to it.  <a href="#ga17"></a><br></dl><li>#define <a class="el" href="group__rect__fns.htm#ga18">RECTW</a>(rc)&nbsp;&nbsp;&nbsp;(rc.right - rc.left)<dl class="el"><dd class="mdescRight">Gets the width of a RECT object.  <a href="#ga18"></a><br></dl><li>#define <a class="el" href="group__rect__fns.htm#ga19">RECTH</a>(rc)&nbsp;&nbsp;&nbsp;(rc.bottom - rc.top)<dl class="el"><dd class="mdescRight">Gets the height of a RECT object.  <a href="#ga19"></a><br></dl></ul><h2>Functions</h2><ul><li>static void <a class="el" href="group__rect__fns.htm#ga0">SetRect</a> (<a class="el" href="struct__RECT.htm">RECT</a> *prc, int left, int top, int right, int bottom)<dl class="el"><dd class="mdescRight">Sets a rectangle.  <a href="#ga0"></a><br></dl><li>static void <a class="el" href="group__rect__fns.htm#ga1">SetRectEmpty</a> (<a class="el" href="struct__RECT.htm">RECT</a> *prc)<dl class="el"><dd class="mdescRight">Empties a rectangle.  <a href="#ga1"></a><br></dl><li>static void <a class="el" href="group__rect__fns.htm#ga2">CopyRect</a> (<a class="el" href="struct__RECT.htm">RECT</a> *pdrc, const <a class="el" href="struct__RECT.htm">RECT</a> *psrc)<dl class="el"><dd class="mdescRight">Copies one rectangle to another.  <a href="#ga2"></a><br></dl><li>static void <a class="el" href="group__rect__fns.htm#ga3">OffsetRect</a> (<a class="el" href="struct__RECT.htm">RECT</a> *prc, int x, int y)<dl class="el"><dd class="mdescRight">Moves a rectangle by offsets.  <a href="#ga3"></a><br></dl><li>static void <a class="el" href="group__rect__fns.htm#ga4">InflateRect</a> (<a class="el" href="struct__RECT.htm">RECT</a> *prc, int cx, int cy)<dl class="el"><dd class="mdescRight">Increases or decreases the width and height of an rectangle.  <a href="#ga4"></a><br></dl><li>static void <a class="el" href="group__rect__fns.htm#ga5">InflateRectToPt</a> (<a class="el" href="struct__RECT.htm">RECT</a> *prc, int x, int y)<dl class="el"><dd class="mdescRight">Inflates a rectangle to contain a point.  <a href="#ga5"></a><br></dl><li>static <a class="el" href="group__simple__types.htm#ga0">BOOL</a> <a class="el" href="group__rect__fns.htm#ga6">PtInRect</a> (const <a class="el" href="struct__RECT.htm">RECT</a> *prc, int x, int y)<dl class="el"><dd class="mdescRight">Determines whether a point lies within an rectangle.  <a href="#ga6"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI <a class="el" href="group__rect__fns.htm#ga7">IsRectEmpty</a> (const <a class="el" href="struct__RECT.htm">RECT</a> *prc)<dl class="el"><dd class="mdescRight">Determines whether an rectangle is empty.  <a href="#ga7"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI <a class="el" href="group__rect__fns.htm#ga8">EqualRect</a> (const <a class="el" href="struct__RECT.htm">RECT</a> *prc1, const <a class="el" href="struct__RECT.htm">RECT</a> *prc2)<dl class="el"><dd class="mdescRight">Determines whether two rectangles are equal.  <a href="#ga8"></a><br></dl><li>MG_EXPORT void GUIAPI <a class="el" href="group__rect__fns.htm#ga9">NormalizeRect</a> (<a class="el" href="struct__RECT.htm">RECT</a> *pRect)<dl class="el"><dd class="mdescRight">Normalizes a rectangle.  <a href="#ga9"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI <a class="el" href="group__rect__fns.htm#ga10">IntersectRect</a> (<a class="el" href="struct__RECT.htm">RECT</a> *pdrc, const <a class="el" href="struct__RECT.htm">RECT</a> *psrc1, const <a class="el" href="struct__RECT.htm">RECT</a> *psrc2)<dl class="el"><dd class="mdescRight">Calculates the intersection of two rectangles.  <a href="#ga10"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI <a class="el" href="group__rect__fns.htm#ga11">IsCovered</a> (const <a class="el" href="struct__RECT.htm">RECT</a> *prc1, const <a class="el" href="struct__RECT.htm">RECT</a> *prc2)<dl class="el"><dd class="mdescRight">Determines whether one rectangle is covered by another.  <a href="#ga11"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI <a class="el" href="group__rect__fns.htm#ga12">DoesIntersect</a> (const <a class="el" href="struct__RECT.htm">RECT</a> *psrc1, const <a class="el" href="struct__RECT.htm">RECT</a> *psrc2)<dl class="el"><dd class="mdescRight">Determines whether two rectangles intersect.  <a href="#ga12"></a><br></dl><li>MG_EXPORT <a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI <a class="el" href="group__rect__fns.htm#ga13">UnionRect</a> (<a class="el" href="struct__RECT.htm">RECT</a> *pdrc, const <a class="el" href="struct__RECT.htm">RECT</a> *psrc1, const <a class="el" href="struct__RECT.htm">RECT</a> *psrc2)<dl class="el"><dd class="mdescRight">Unions two source rectangles.  <a href="#ga13"></a><br></dl><li>MG_EXPORT void GUIAPI <a class="el" href="group__rect__fns.htm#ga14">GetBoundRect</a> (<a class="el" href="struct__RECT.htm">PRECT</a> pdrc, const <a class="el" href="struct__RECT.htm">RECT</a> *psrc1, const <a class="el" href="struct__RECT.htm">RECT</a> *psrc2)<dl class="el"><dd class="mdescRight">Gets the bound rectangle of two source rectangles.  <a href="#ga14"></a><br></dl><li>MG_EXPORT int GUIAPI <a class="el" href="group__rect__fns.htm#ga15">SubtractRect</a> (<a class="el" href="struct__RECT.htm">RECT</a> *rc, const <a class="el" href="struct__RECT.htm">RECT</a> *psrc1, const <a class="el" href="struct__RECT.htm">RECT</a> *psrc2)<dl class="el"><dd class="mdescRight">Obtains the rectangles when substracting one rectangle from another.  <a href="#ga15"></a><br></dl></ul><hr><h2>Define Documentation</h2><a class="anchor" name="ga19" doxytag="gdi.h::RECTH"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define RECTH          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">rc&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;(rc.bottom - rc.top)</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Gets the height of a RECT object. <p><p>Definition at line <a class="el" href="gdi_8h-source.htm#l05186">5186</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>.    </td>  </tr></table><a class="anchor" name="ga17" doxytag="gdi.h::RECTHP"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define RECTHP          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">prc&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;(prc-&gt;bottom - prc-&gt;top)</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Gets the height of a RECT object by using the pointer to it. <p><p>Definition at line <a class="el" href="gdi_8h-source.htm#l05176">5176</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>.    </td>  </tr></table><a class="anchor" name="ga18" doxytag="gdi.h::RECTW"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define RECTW          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">rc&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;(rc.right - rc.left)</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Gets the width of a RECT object. <p><p>Definition at line <a class="el" href="gdi_8h-source.htm#l05181">5181</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>.    </td>  </tr></table><a class="anchor" name="ga16" doxytag="gdi.h::RECTWP"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">#define RECTWP          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">prc&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;(prc-&gt;right - prc-&gt;left)</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Gets the width of a RECT object by using the pointer to it. <p><p>Definition at line <a class="el" href="gdi_8h-source.htm#l05171">5171</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>.    </td>  </tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="ga2" doxytag="gdi.h::CopyRect"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void CopyRect           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="struct__RECT.htm">RECT</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>pdrc</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="struct__RECT.htm">RECT</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>psrc</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [inline, static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Copies one rectangle to another. <p>This function copies the coordinates of the source rectangle pointed to by <em>psrc</em> to the destination rectangle pointed to by <em>pdrc</em>.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>pdrc</em>&nbsp;</td><td>The pointer to the destination rectangle. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>psrc</em>&nbsp;</td><td>The pointer to the source rectangle.</td></tr>  </table></dl><dl compact><dt><b>Note:</b></dt><dd>Defined as an inline function for _USE_NEWGAL.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__rect__fns.htm#ga0">SetRect</a> </dd></dl><p>Definition at line <a class="el" href="gdi_8h-source.htm#l04905">4905</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>.    </td>  </tr></table><a class="anchor" name="ga12" doxytag="gdi.h::DoesIntersect"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"><a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI DoesIntersect           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="struct__RECT.htm">RECT</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>psrc1</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="struct__RECT.htm">RECT</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>psrc2</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Determines whether two rectangles intersect. <p>This function determines whether two rectangles (<em>psrc1</em> and <em>psrc2</em>) intersect.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>psrc1</em>&nbsp;</td><td>The first source rectangles. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>psrc2</em>&nbsp;</td><td>The second source rectangles. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>TRUE if the source rectangles intersect, otherwise FALSE.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__rect__fns.htm#ga10">IntersectRect</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga8" doxytag="gdi.h::EqualRect"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"><a class="el" href="group__simple__types.htm#ga0">BOOL</a> GUIAPI EqualRect           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="struct__RECT.htm">RECT</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>prc1</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="struct__RECT.htm">RECT</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>prc2</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Determines whether two rectangles are equal. <p>This function determines whether the two specified rectangles (<em>prc1</em> and <em>prc2</em>) are equal by comparing the coordinates of the upper-left and lower-right corners.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>prc1</em>&nbsp;</td><td>The pointers to the first rectangles. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>prc2</em>&nbsp;</td><td>The pointers to the second rectangles. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>TRUE for equal, otherwise FALSE. </dd></dl>    </td>  </tr></table><a class="anchor" name="ga14" doxytag="gdi.h::GetBoundRect"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void GUIAPI GetBoundRect           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="struct__RECT.htm">PRECT</a>&nbsp;</td>          <td class="mdname" nowrap> <em>pdrc</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="struct__RECT.htm">RECT</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>psrc1</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const <a class="el" href="struct__RECT.htm">RECT</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>psrc2</em></td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -