📄 group__region__fns.htm
字号:
<table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>dst</em> </td><td>The pointer to the region to be initialized. </td></tr> <tr><td valign="top"></td><td valign="top"><em>x</em> </td><td>x,y: The center of the circle. </td></tr> <tr><td valign="top"></td><td valign="top"><em>y</em> </td><td>x,y: The center of the circle. </td></tr> <tr><td valign="top"></td><td valign="top"><em>r</em> </td><td>The radius of the circle.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>TRUE on success, otherwise FALSE.</dd></dl><dl compact><dt><b>Note:</b></dt><dd>This fucntion defined only for _USE_NEWGAL.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__region__fns.htm#ga24">InitEllipseRegion</a>, <a class="el" href="group__region__fns.htm#ga25">InitPolygonRegion</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga4" doxytag="gdi.h::InitClipRgn"></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 InitClipRgn </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="struct__CLIPRGN.htm">PCLIPRGN</a> </td> <td class="mdname" nowrap> <em>pRgn</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="struct__BLOCKHEAP.htm">PBLOCKHEAP</a> </td> <td class="mdname" nowrap> <em>pFreeList</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Initializes a clipping region. <p>Before intializing a clipping region, you should initialize a private block data heap first. The region operations, such as <em>UnionRegion</em> function, will allocate/free the clipping rectangles from/to the heap. This function will set the <em>heap</em> field of <em>pRgn</em> to be <em>pFreeList</em>, and empty the region.<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>pRgn</em> </td><td>The pointer to the CLIPRGN structure to be initialized. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pFreeList</em> </td><td>The pointer to the initialized private block data heap.</td></tr> </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__region__fns.htm#ga29">InitFreeClipRectList</a>, <a class="el" href="group__region__fns.htm#ga5">EmptyClipRgn</a>.</dd></dl>Example:<p><div class="fragment"><pre class="fragment"><span class="keyword">static</span> <a class="code" href="struct__BLOCKHEAP.htm">BLOCKHEAP</a> sg_MyFreeClipRectList;... <a class="code" href="struct__CLIPRGN.htm">CLIPRGN</a> my_region <a class="code" href="group__region__fns.htm#ga29">InitFreeClipRectList</a> (&sg_MyFreeClipRectList, 20); <a class="code" href="group__region__fns.htm#ga4">InitClipRgn</a> (&my_regioni, &sg_MyFreeClipRectList);</pre></div> </td> </tr></table><a class="anchor" name="ga24" doxytag="gdi.h::InitEllipseRegion"></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 InitEllipseRegion </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="struct__CLIPRGN.htm">PCLIPRGN</a> </td> <td class="mdname" nowrap> <em>dst</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>x</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>y</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>rx</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>ry</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Initializes a region to be an enclosed ellipse. <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>dst</em> </td><td>The pointer to the region to be initialized. </td></tr> <tr><td valign="top"></td><td valign="top"><em>x</em> </td><td>x,y: The center of the ellipse. </td></tr> <tr><td valign="top"></td><td valign="top"><em>y</em> </td><td>x,y: The center of the ellipse. </td></tr> <tr><td valign="top"></td><td valign="top"><em>rx</em> </td><td>The x-radius of the ellipse. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ry</em> </td><td>The y-radius of the ellipse. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>TRUE on success, otherwise FALSE.</dd></dl><dl compact><dt><b>Note:</b></dt><dd>This fucntion defined only for _USE_NEWGAL.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__region__fns.htm#ga23">InitCircleRegion</a>, <a class="el" href="group__region__fns.htm#ga25">InitPolygonRegion</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga25" doxytag="gdi.h::InitPolygonRegion"></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 InitPolygonRegion </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="struct__CLIPRGN.htm">PCLIPRGN</a> </td> <td class="mdname" nowrap> <em>dst</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__POINT.htm">POINT</a> * </td> <td class="mdname" nowrap> <em>pts</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>vertices</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Initializes a region to be an enclosed polygon. <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>dst</em> </td><td>The pointer to the region to be initialized. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pts</em> </td><td>The vertex array of the polygon. </td></tr> <tr><td valign="top"></td><td valign="top"><em>vertices</em> </td><td>The number of the vertices. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>TRUE on success, otherwise FALSE.</dd></dl><dl compact><dt><b>Note:</b></dt><dd>This fucntion defined only for _USE_NEWGAL.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__region__fns.htm#ga23">InitCircleRegion</a>, <a class="el" href="group__region__fns.htm#ga24">InitEllipseRegion</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga14" doxytag="gdi.h::IntersectClipRect"></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 IntersectClipRect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="struct__CLIPRGN.htm">PCLIPRGN</a> </td> <td class="mdname" nowrap> <em>pRgn</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> * </td> <td class="mdname" nowrap> <em>pRect</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Intersects a rectangle with a region. <p>This function intersects the region pointed to by <em>pRgn</em> with a rect pointed to by <em>pRect</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>pRgn</em> </td><td>The pointer to the region. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pRect</em> </td><td>The pointer to the rectangle.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>TRUE on success, otherwise FALSE.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__region__fns.htm#ga13">AddClipRect</a>, <a class="el" href="group__region__fns.htm#ga15">SubtractClipRect</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga12" doxytag="gdi.h::IsEmptyClipRgn"></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 IsEmptyClipRgn </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="struct__CLIPRGN.htm">CLIPRGN</a> * </td> <td class="mdname1" valign="top" nowrap> <em>pRgn</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Determines whether a region is an empty region. <p>This function determines whether the region pointed to by <em>pRgn</em> is an empty region.<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>pRgn</em> </td><td>The pointer to the region.</td></tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -