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

📄 classwgui_1_1crgbcolor.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::CRGBColor 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::CRGBColor Class Reference</h1>The <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> class is used for all wGui representations of color. <a href="#_details">More...</a><p><code>#include &lt;<a class="el" href="wg__color_8h-source.html">wg_color.h</a>&gt;</code><p><h2>Public Methods</h2><ul><li><a class="el" href="classwGui_1_1CRGBColor.html#a0">CRGBColor</a> (const unsigned char r, const unsigned char g, const unsigned char b, const unsigned char a=0xFF)<li><a class="el" href="classwGui_1_1CRGBColor.html#a1">CRGBColor</a> (const Uint32 *pColorValue, const SDL_PixelFormat *pFormat)<li>unsigned long int <a class="el" href="classwGui_1_1CRGBColor.html#a2">SDLColor</a> (SDL_PixelFormat *pFormat) const<li>bool <a class="el" href="classwGui_1_1CRGBColor.html#a3">operator==</a> (const CRGBColor &amp;c) const<li>bool <a class="el" href="classwGui_1_1CRGBColor.html#a4">operator!=</a> (const CRGBColor &amp;c) const<li><a name="a5" doxytag="wGui::CRGBColor::operator="></a>CRGBColor &amp; <a class="el" href="classwGui_1_1CRGBColor.html#a5">operator=</a> (const CRGBColor &amp;c)<dl class="el"><dd><font size=-1><em>Assignment operator.<br><br></em></font></dl><li><a name="a6" doxytag="wGui::CRGBColor::operator+"></a>CRGBColor <a class="el" href="classwGui_1_1CRGBColor.html#a6">operator+</a> (const CRGBColor &amp;c) const<dl class="el"><dd><font size=-1><em>Does standard color mixing.<br><br></em></font></dl><li><a name="a7" doxytag="wGui::CRGBColor::operator|"></a>CRGBColor <a class="el" href="classwGui_1_1CRGBColor.html#a7">operator|</a> (const CRGBColor &amp;c) const<dl class="el"><dd><font size=-1><em>Does OR color mixing.<br><br></em></font></dl><li><a name="a8" doxytag="wGui::CRGBColor::operator &"></a>CRGBColor <a class="el" href="classwGui_1_1CRGBColor.html#a8">operator &amp;</a> (const CRGBColor &amp;c) const<dl class="el"><dd><font size=-1><em>Does AND color mixing.<br><br></em></font></dl><li><a name="a9" doxytag="wGui::CRGBColor::operator^"></a>CRGBColor <a class="el" href="classwGui_1_1CRGBColor.html#a9">operator^</a> (const CRGBColor &amp;c) const<dl class="el"><dd><font size=-1><em>Does XOR color mixing.<br><br></em></font></dl></ul><h2>Data Fields</h2><ul><li><a name="m0" doxytag="wGui::CRGBColor::red"></a>unsigned char <a class="el" href="classwGui_1_1CRGBColor.html#m0">red</a><dl class="el"><dd><font size=-1><em>Red component of the color.<br><br></em></font></dl><li><a name="m1" doxytag="wGui::CRGBColor::green"></a>unsigned char <a class="el" href="classwGui_1_1CRGBColor.html#m1">green</a><dl class="el"><dd><font size=-1><em>Green component of the color.<br><br></em></font></dl><li><a name="m2" doxytag="wGui::CRGBColor::blue"></a>unsigned char <a class="el" href="classwGui_1_1CRGBColor.html#m2">blue</a><dl class="el"><dd><font size=-1><em>Blue component of the color.<br><br></em></font></dl><li><a name="m3" doxytag="wGui::CRGBColor::alpha"></a>unsigned char <a class="el" href="classwGui_1_1CRGBColor.html#m3">alpha</a><dl class="el"><dd><font size=-1><em>Alpha component (or opacity) of the color.<br><br></em></font></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>The <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> class is used for all wGui representations of color.<p><p>Definition at line <a class="el" href="wg__color_8h-source.html#l00036">36</a> of file <a class="el" href="wg__color_8h-source.html">wg_color.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="wGui::CRGBColor::CRGBColor"></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::CRGBColor::CRGBColor </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const unsigned char&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>r</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const unsigned char&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>g</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const unsigned char&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>b</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const unsigned char&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>a</em> = 0xFF</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>Construct a new color object <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>r</em>&nbsp;</td><td>Red component value </td></tr><tr><td valign=top><em>b</em>&nbsp;</td><td>Blue component value </td></tr><tr><td valign=top><em>g</em>&nbsp;</td><td>Green component value </td></tr><tr><td valign=top><em>a</em>&nbsp;</td><td>Alpha value, default value of 0xFF (fully opaque) </td></tr></table></dl><p>Definition at line <a class="el" href="wg__color_8h-source.html#l00049">49</a> of file <a class="el" href="wg__color_8h-source.html">wg_color.h</a>.<p>References <a class="el" href="wg__color_8h-source.html#l00042">alpha</a>, <a class="el" href="wg__color_8h-source.html#l00041">blue</a>, <a class="el" href="wg__color_8h-source.html#l00040">green</a>, and <a class="el" href="wg__color_8h-source.html#l00039">red</a>.<p>Referenced by <a class="el" href="wg__color_8cpp-source.html#l00068">operator &amp;()</a>, <a class="el" href="wg__color_8cpp-source.html#l00051">operator+()</a>, <a class="el" href="wg__color_8cpp-source.html#l00074">operator^()</a>, and <a class="el" href="wg__color_8cpp-source.html#l00062">operator|()</a>.    </td>  </tr></table><a name="a1" doxytag="wGui::CRGBColor::CRGBColor"></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::CRGBColor::CRGBColor </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const Uint32 *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>pColorValue</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap>const SDL_PixelFormat *&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>pFormat</em></td>        </tr>        <tr>          <td></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>Construct a <a class="el" href="classwGui_1_1CRGBColor.html">CRGBColor</a> object from an SDL Color <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>pColorValue</em>&nbsp;</td><td>A pointer to the SDL Color </td></tr><tr><td valign=top><em>pFormat</em>&nbsp;</td><td>A pointer to the SDL Pixel Format </td></tr></table></dl><p>Definition at line <a class="el" href="wg__color_8cpp-source.html#l00032">32</a> of file <a class="el" href="wg__color_8cpp-source.html">wg_color.cpp</a>.<p>References <a class="el" href="wg__color_8h-source.html#l00042">alpha</a>, <a class="el" href="wg__color_8h-source.html#l00041">blue</a>, <a class="el" href="wg__color_8h-source.html#l00040">green</a>, and <a class="el" href="wg__color_8h-source.html#l00039">red</a>.    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="a4" doxytag="wGui::CRGBColor::operator!="></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"> bool wGui::CRGBColor::operator!= </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const CRGBColor &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>c</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap> const<code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Inequality operator does not take into accoutn alpha values <dl compact><dt><b>Returns: </b></dt><dd>true if any of the Red, Green, or Blue color components differ </dl><p>Definition at line <a class="el" href="wg__color_8h-source.html#l00071">71</a> of file <a class="el" href="wg__color_8h-source.html">wg_color.h</a>.<p>References <a class="el" href="wg__color_8h-source.html#l00041">blue</a>, <a class="el" href="wg__color_8h-source.html#l00040">green</a>, and <a class="el" href="wg__color_8h-source.html#l00039">red</a>.    </td>  </tr></table><a name="a3" doxytag="wGui::CRGBColor::operator=="></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"> bool wGui::CRGBColor::operator== </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const CRGBColor &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>c</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap> const<code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Comparison operator does not take into account alpha values <dl compact><dt><b>Returns: </b></dt><dd>true if the Red, Green, and Blue color components are the same </dl><p>Definition at line <a class="el" href="wg__color_8h-source.html#l00064">64</a> of file <a class="el" href="wg__color_8h-source.html">wg_color.h</a>.<p>References <a class="el" href="wg__color_8h-source.html#l00041">blue</a>, <a class="el" href="wg__color_8h-source.html#l00040">green</a>, and <a class="el" href="wg__color_8h-source.html#l00039">red</a>.    </td>  </tr></table><a name="a2" doxytag="wGui::CRGBColor::SDLColor"></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"> unsigned long int wGui::CRGBColor::SDLColor </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">SDL_PixelFormat *&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>pFormat</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap> const<code> [inline]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Convert the color so an SDL Color <dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>pFormat</em>&nbsp;</td><td>A pointer to the SDL Pixel Format </td></tr></table></dl><p>Definition at line <a class="el" href="wg__color_8h-source.html#l00059">59</a> of file <a class="el" href="wg__color_8h-source.html">wg_color.h</a>.<p>References <a class="el" href="wg__color_8h-source.html#l00042">alpha</a>, <a class="el" href="wg__color_8h-source.html#l00041">blue</a>, <a class="el" href="wg__color_8h-source.html#l00040">green</a>, and <a class="el" href="wg__color_8h-source.html#l00039">red</a>.<p>Referenced by <a class="el" href="wg__painter_8cpp-source.html#l00066">wGui::CPainter::DrawHLine()</a>, <a class="el" href="wg__painter_8cpp-source.html#l00177">wGui::CPainter::DrawPoint()</a>, <a class="el" href="wg__painter_8cpp-source.html#l00122">wGui::CPainter::DrawRect()</a>, <a class="el" href="wg__painter_8cpp-source.html#l00094">wGui::CPainter::DrawVLine()</a>, and <a class="el" href="wg__painter_8cpp-source.html#l00322">wGui::CPainter::TransparentColor()</a>.    </td>  </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="wg__color_8h-source.html">wg_color.h</a><li><a class="el" href="wg__color_8cpp-source.html">wg_color.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 + -