📄 classwgui_1_1cpoint.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> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> </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 <<a class="el" href="wg__point_8h-source.html">wg_point.h</a>></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 &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 &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 &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 &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 &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 &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 &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 &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 &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 & 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">( </td> <td class="md" nowrap valign="top">const int </td> <td class="mdname" nowrap> <em>x</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const int </td> <td class="mdname" nowrap> <em>y</em></td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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> </td><td>X coordinate </td></tr><tr><td valign=top><em>y</em> </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">( </td> <td class="md" nowrap valign="top">const int </td> <td class="mdname1" valign="top" nowrap> <em>x</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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> </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">( </td> <td class="md" nowrap valign="top">const int </td> <td class="mdname1" valign="top" nowrap> <em>y</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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> </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 + -