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

📄 classwgui_1_1cpoint.html

📁 一个小巧的嵌入式图形系统wGUI, 可以用VC编译
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>wGui::CPoint class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; </center><hr><h1>wGui::CPoint Class Reference</h1><a class="el" href="classwGui_1_1CPoint.html">CPoint</a> defines a point in cartestian (X, Y) space. <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="wg__point_8h-source.html">wg_point.h</a>&gt;</code><p><h2>Public Methods</h2><ul><li><a name="a0" doxytag="wGui::CPoint::CPoint"></a><a class="el" href="classwGui_1_1CPoint.html#a0">CPoint</a> ()<dl class="el"><dd><font size=-1><em>Initializes the point to (0, 0).<br><br></em></font></dl><li><a class="el" href="classwGui_1_1CPoint.html#a1">CPoint</a> (const int x, const int y)<li><a name="a2" doxytag="wGui::CPoint::CPoint"></a><a class="el" href="classwGui_1_1CPoint.html#a2">CPoint</a> (const CPoint &amp;p)<dl class="el"><dd><font size=-1><em>Copy constructor.<br><br></em></font></dl><li><a name="a3" doxytag="wGui::CPoint::~CPoint"></a>virtual <a class="el" href="classwGui_1_1CPoint.html#a3">~CPoint</a> ()<dl class="el"><dd><font size=-1><em>Standard Destructor.<br><br></em></font></dl><li>void <a class="el" href="classwGui_1_1CPoint.html#a4">SetX</a> (const int x)<li>void <a class="el" href="classwGui_1_1CPoint.html#a5">SetY</a> (const int y)<li><a name="a6" doxytag="wGui::CPoint::XPos"></a>int <a class="el" href="classwGui_1_1CPoint.html#a6">XPos</a> (void) const<dl class="el"><dd><font size=-1><em><dl compact><dt><b>Returns: </b></dt><dd>X coordinate</dl><br><br></em></font></dl><li><a name="a7" doxytag="wGui::CPoint::YPos"></a>int <a class="el" href="classwGui_1_1CPoint.html#a7">YPos</a> (void) const<dl class="el"><dd><font size=-1><em><dl compact><dt><b>Returns: </b></dt><dd>Y coordinate</dl><br><br></em></font></dl><li><a name="a8" doxytag="wGui::CPoint::operator+"></a>CPoint <a class="el" href="classwGui_1_1CPoint.html#a8">operator+</a> (const CPoint &amp;p) const<dl class="el"><dd><font size=-1><em>Add the X and Y coordinates of the points.<br><br></em></font></dl><li><a name="a9" doxytag="wGui::CPoint::operator-"></a>CPoint <a class="el" href="classwGui_1_1CPoint.html#a9">operator-</a> (const CPoint &amp;p) const<dl class="el"><dd><font size=-1><em>Subtract the X and Y coordinates of the points.<br><br></em></font></dl><li><a name="a10" doxytag="wGui::CPoint::operator="></a>CPoint <a class="el" href="classwGui_1_1CPoint.html#a10">operator=</a> (const CPoint &amp;p)<dl class="el"><dd><font size=-1><em>Assign the value of point p to the point.<br><br></em></font></dl><li><a name="a11" doxytag="wGui::CPoint::operator=="></a>bool <a class="el" href="classwGui_1_1CPoint.html#a11">operator==</a> (const CPoint &amp;p) const<dl class="el"><dd><font size=-1><em>Equality operator evaluates to true if the x and y coordinates are the same for both points.<br><br></em></font></dl><li><a name="a12" doxytag="wGui::CPoint::leftof"></a>bool <a class="el" href="classwGui_1_1CPoint.html#a12">leftof</a> (const CPoint &amp;p) const<dl class="el"><dd><font size=-1><em><dl compact><dt><b>Returns: </b></dt><dd>true if the point is to the left of point p</dl><br><br></em></font></dl><li><a name="a13" doxytag="wGui::CPoint::rightof"></a>bool <a class="el" href="classwGui_1_1CPoint.html#a13">rightof</a> (const CPoint &amp;p) const<dl class="el"><dd><font size=-1><em><dl compact><dt><b>Returns: </b></dt><dd>true if the point is to the right of point p</dl><br><br></em></font></dl><li><a name="a14" doxytag="wGui::CPoint::above"></a>bool <a class="el" href="classwGui_1_1CPoint.html#a14">above</a> (const CPoint &amp;p) const<dl class="el"><dd><font size=-1><em><dl compact><dt><b>Returns: </b></dt><dd>true if the point is above point p</dl><br><br></em></font></dl><li><a name="a15" doxytag="wGui::CPoint::below"></a>bool <a class="el" href="classwGui_1_1CPoint.html#a15">below</a> (const CPoint &amp;p) const<dl class="el"><dd><font size=-1><em><dl compact><dt><b>Returns: </b></dt><dd>true if the point is below point p</dl><br><br></em></font></dl></ul><h2>Protected Attributes</h2><ul><li><a name="n0" doxytag="wGui::CPoint::m_XPos"></a>int <a class="el" href="classwGui_1_1CPoint.html#n0">m_XPos</a><dl class="el"><dd><font size=-1><em>The X coordinate.<br><br></em></font></dl><li><a name="n1" doxytag="wGui::CPoint::m_YPos"></a>int <a class="el" href="classwGui_1_1CPoint.html#n1">m_YPos</a><dl class="el"><dd><font size=-1><em>The Y coordinate.<br><br></em></font></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2><a class="el" href="classwGui_1_1CPoint.html">CPoint</a> defines a point in cartestian (X, Y) space.<p>Screen coordinates are assumed, where the origin is in the top left corner of the screen and Y increases in the downward direction <p><p>Definition at line <a class="el" href="wg__point_8h-source.html#l00038">38</a> of file <a class="el" href="wg__point_8h-source.html">wg_point.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a1" doxytag="wGui::CPoint::CPoint"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> wGui::CPoint::CPoint </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>x</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const int&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>y</em></td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Initialize the point to (x, y) <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>x</em>&nbsp;</td><td>X coordinate </td></tr><tr><td valign=top><em>y</em>&nbsp;</td><td>Y coordinate </td></tr></table></dl><p>Definition at line <a class="el" href="wg__point_8h-source.html#l00047">47</a> of file <a class="el" href="wg__point_8h-source.html">wg_point.h</a>.<p>References <a class="el" href="wg__point_8h-source.html#l00096">m_XPos</a>, and <a class="el" href="wg__point_8h-source.html#l00099">m_YPos</a>.    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="a4" doxytag="wGui::CPoint::SetX"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void wGui::CPoint::SetX </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>x</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Set the X coordinate <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>x</em>&nbsp;</td><td>X coordinate </td></tr></table></dl><p>Definition at line <a class="el" href="wg__point_8h-source.html#l00057">57</a> of file <a class="el" href="wg__point_8h-source.html">wg_point.h</a>.<p>References <a class="el" href="wg__point_8h-source.html#l00096">m_XPos</a>.<p>Referenced by <a class="el" href="wg__renderedstring_8cpp-source.html#l00106">wGui::CRenderedString::GetMetrics()</a>, <a class="el" href="wg__frame_8cpp-source.html#l00163">wGui::CFrame::HandleMessage()</a>, <a class="el" href="wg__point_8cpp-source.html#l00035">operator+()</a>, and <a class="el" href="wg__point_8cpp-source.html#l00046">operator-()</a>.    </td>  </tr></table><a name="a5" doxytag="wGui::CPoint::SetY"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> void wGui::CPoint::SetY </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const int&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>y</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Set the Y coordinate <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>y</em>&nbsp;</td><td>Y coordinate </td></tr></table></dl><p>Definition at line <a class="el" href="wg__point_8h-source.html#l00061">61</a> of file <a class="el" href="wg__point_8h-source.html">wg_point.h</a>.<p>References <a class="el" href="wg__point_8h-source.html#l00099">m_YPos</a>.<p>Referenced by <a class="el" href="wg__renderedstring_8cpp-source.html#l00106">wGui::CRenderedString::GetMetrics()</a>, <a class="el" href="wg__frame_8cpp-source.html#l00163">wGui::CFrame::HandleMessage()</a>, <a class="el" href="wg__point_8cpp-source.html#l00035">operator+()</a>, and <a class="el" href="wg__point_8cpp-source.html#l00046">operator-()</a>.    </td>  </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="wg__point_8h-source.html">wg_point.h</a><li><a class="el" href="wg__point_8cpp-source.html">wg_point.cpp</a></ul><hr><address style="align: right;"><small>Generated on Sat Oct 25 12:43:28 2003 for wGui by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>

⌨️ 快捷键说明

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