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

📄 wg__color_8h-source.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>wg_color.h Source File</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>wg_color.h</h1><div class="fragment"><pre>00001 <span class="comment">// wg_color.h</span>00002 <span class="comment">//</span>00003 <span class="comment">// CRGBColor class interface</span>00004 <span class="comment">//</span>00005 <span class="comment">//</span>00006 <span class="comment">// Copyright (c) 2002 Rob Wiskow</span>00007 <span class="comment">// rob-dev@boxedchaos.com</span>00008 <span class="comment">//</span>00009 <span class="comment">// This library is free software; you can redistribute it and/or</span>00010 <span class="comment">// modify it under the terms of the GNU Lesser General Public</span>00011 <span class="comment">// License as published by the Free Software Foundation; either</span>00012 <span class="comment">// version 2.1 of the License, or (at your option) any later version.</span>00013 <span class="comment">//</span>00014 <span class="comment">// This library is distributed in the hope that it will be useful,</span>00015 <span class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</span>00016 <span class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span>00017 <span class="comment">// Lesser General Public License for more details.</span>00018 <span class="comment">//</span>00019 <span class="comment">// You should have received a copy of the GNU Lesser General Public</span>00020 <span class="comment">// License along with this library; if not, write to the Free Software</span>00021 <span class="comment">// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>00022 <span class="comment">//</span>00023 00024 00025 <span class="preprocessor">#ifndef _WG_COLOR_H_</span>00026 <span class="preprocessor"></span><span class="preprocessor">#define _WG_COLOR_H_</span>00027 <span class="preprocessor"></span>00028 <span class="preprocessor">#include "SDL.h"</span>00029 00030 00031 <span class="keyword">namespace </span>wGui00032 {00033 00035 <a name="l00036"></a><a class="code" href="classwGui_1_1CRGBColor.html">00036</a> <span class="keyword">class </span><a class="code" href="classwGui_1_1CRGBColor.html">CRGBColor</a>00037 {00038 <span class="keyword">public</span>:<a name="l00039"></a><a class="code" href="classwGui_1_1CRGBColor.html#m0">00039</a>      <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="classwGui_1_1CRGBColor.html#m0">red</a>;  <a name="l00040"></a><a class="code" href="classwGui_1_1CRGBColor.html#m1">00040</a>      <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="classwGui_1_1CRGBColor.html#m1">green</a>;  <a name="l00041"></a><a class="code" href="classwGui_1_1CRGBColor.html#m2">00041</a>      <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="classwGui_1_1CRGBColor.html#m2">blue</a>;  <a name="l00042"></a><a class="code" href="classwGui_1_1CRGBColor.html#m3">00042</a>      <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="classwGui_1_1CRGBColor.html#m3">alpha</a>;  00043 <a name="l00049"></a><a class="code" href="classwGui_1_1CRGBColor.html#a0">00049</a>      <a class="code" href="classwGui_1_1CRGBColor.html#a0">CRGBColor</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> r, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> g, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> b, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> a = 0xFF) :00050           <a class="code" href="classwGui_1_1CRGBColor.html#m0">red</a>(r), <a class="code" href="classwGui_1_1CRGBColor.html#m1">green</a>(g), <a class="code" href="classwGui_1_1CRGBColor.html#m2">blue</a>(b), <a class="code" href="classwGui_1_1CRGBColor.html#m3">alpha</a>(a) { }00051 00055      <a class="code" href="classwGui_1_1CRGBColor.html#a0">CRGBColor</a>(<span class="keyword">const</span> Uint32* pColorValue, <span class="keyword">const</span> SDL_PixelFormat* pFormat);00056 <a name="l00059"></a><a class="code" href="classwGui_1_1CRGBColor.html#a2">00059</a>      <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <span class="keywordtype">int</span> <a class="code" href="classwGui_1_1CRGBColor.html#a2">SDLColor</a>(SDL_PixelFormat* pFormat)<span class="keyword"> const</span>00060 <span class="keyword">          </span>{ <span class="keywordflow">return</span> SDL_MapRGBA(pFormat, <a class="code" href="classwGui_1_1CRGBColor.html#m0">red</a>, <a class="code" href="classwGui_1_1CRGBColor.html#m1">green</a>, <a class="code" href="classwGui_1_1CRGBColor.html#m2">blue</a>, <a class="code" href="classwGui_1_1CRGBColor.html#m3">alpha</a>); }00061 <a name="l00064"></a><a class="code" href="classwGui_1_1CRGBColor.html#a3">00064</a>      <span class="keywordtype">bool</span> <a class="code" href="classwGui_1_1CRGBColor.html#a3">operator==</a>(<span class="keyword">const</span> <a class="code" href="classwGui_1_1CRGBColor.html">CRGBColor</a>&amp; c)<span class="keyword"> const</span>00065 <span class="keyword">     </span>{00066           <span class="keywordflow">return</span> (<a class="code" href="classwGui_1_1CRGBColor.html#m0">red</a> == c.<a class="code" href="classwGui_1_1CRGBColor.html#m0">red</a> &amp;&amp; <a class="code" href="classwGui_1_1CRGBColor.html#m1">green</a> == c.<a class="code" href="classwGui_1_1CRGBColor.html#m1">green</a> &amp;&amp; <a class="code" href="classwGui_1_1CRGBColor.html#m2">blue</a> == c.<a class="code" href="classwGui_1_1CRGBColor.html#m2">blue</a>);00067      }00068 <a name="l00071"></a><a class="code" href="classwGui_1_1CRGBColor.html#a4">00071</a>      <span class="keywordtype">bool</span> <a class="code" href="classwGui_1_1CRGBColor.html#a4">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classwGui_1_1CRGBColor.html">CRGBColor</a>&amp; c)<span class="keyword"> const</span>00072 <span class="keyword">     </span>{00073           <span class="keywordflow">return</span> (<a class="code" href="classwGui_1_1CRGBColor.html#m0">red</a> != c.<a class="code" href="classwGui_1_1CRGBColor.html#m0">red</a> || <a class="code" href="classwGui_1_1CRGBColor.html#m1">green</a> != c.<a class="code" href="classwGui_1_1CRGBColor.html#m1">green</a> || <a class="code" href="classwGui_1_1CRGBColor.html#m2">blue</a> != c.<a class="code" href="classwGui_1_1CRGBColor.html#m2">blue</a>);00074      }00075 00077      <a class="code" href="classwGui_1_1CRGBColor.html#a0">CRGBColor</a>&amp; <a class="code" href="classwGui_1_1CRGBColor.html#a5">operator=</a>(<span class="keyword">const</span> <a class="code" href="classwGui_1_1CRGBColor.html#a0">CRGBColor</a>&amp; c);00078 00080      <a class="code" href="classwGui_1_1CRGBColor.html#a0">CRGBColor</a> <a class="code" href="classwGui_1_1CRGBColor.html#a6">operator+</a>(<span class="keyword">const</span> <a class="code" href="classwGui_1_1CRGBColor.html#a0">CRGBColor</a>&amp; c) <span class="keyword">const</span>;00081 00083      <a class="code" href="classwGui_1_1CRGBColor.html#a0">CRGBColor</a> <a class="code" href="classwGui_1_1CRGBColor.html#a7">operator|</a>(<span class="keyword">const</span> <a class="code" href="classwGui_1_1CRGBColor.html#a0">CRGBColor</a>&amp; c) <span class="keyword">const</span>;00084 00086      <a class="code" href="classwGui_1_1CRGBColor.html#a0">CRGBColor</a> <a class="code" href="classwGui_1_1CRGBColor.html#a8">operator&amp;</a>(<span class="keyword">const</span> <a class="code" href="classwGui_1_1CRGBColor.html#a0">CRGBColor</a>&amp; c) <span class="keyword">const</span>;00087 00089      <a class="code" href="classwGui_1_1CRGBColor.html#a0">CRGBColor</a> <a class="code" href="classwGui_1_1CRGBColor.html#a9">operator^</a>(<span class="keyword">const</span> <a class="code" href="classwGui_1_1CRGBColor.html#a0">CRGBColor</a>&amp; c) <span class="keyword">const</span>;00090 };00091 00092 00093 <span class="comment">// Predefined colors</span>00094 <span class="keyword">extern</span> CRGBColor DEFAULT_BG_COLOR;00095 <span class="keyword">extern</span> CRGBColor DEFAULT_FG_COLOR;00096 <span class="keyword">extern</span> CRGBColor DEFAULT_LINE_COLOR;00097 <span class="keyword">extern</span> CRGBColor DEFAULT_DISABLED_LINE_COLOR;00098 <span class="keyword">extern</span> CRGBColor COLOR_TRANSPARENT;00099 <span class="keyword">extern</span> CRGBColor COLOR_WHITE;00100 <span class="keyword">extern</span> CRGBColor COLOR_LIGHTGRAY;00101 <span class="keyword">extern</span> CRGBColor COLOR_GRAY;00102 <span class="keyword">extern</span> CRGBColor COLOR_DARKGRAY;00103 <span class="keyword">extern</span> CRGBColor COLOR_BLACK;00104 <span class="keyword">extern</span> CRGBColor COLOR_BLUE;00105 <span class="keyword">extern</span> CRGBColor COLOR_RED;00106 <span class="keyword">extern</span> CRGBColor COLOR_GREEN;00107 <span class="keyword">extern</span> CRGBColor COLOR_YELLOW;00108 00109 }00110 00111 <span class="preprocessor">#endif // _WG_COLOR_H_</span>00112 <span class="preprocessor"></span>00113 </pre></div><hr><address style="align: right;"><small>Generated on Sat Oct 25 12:43:22 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 + -