<!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>Crystal Space 1.2.1: csColor Class Reference (Crystal Space 1.2.1 Public API Reference)</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table border="0" cellpadding="0" cellspacing="0" width="100%" class="head"> <tr height="59"> <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td> <td class="head"><h2>Public API Reference</h2></td> </tr> <tr height="11"> <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td> </tr> </table> <div class="content"> <!-- Generated by Doxygen 1.5.3 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <h1>csColor Class Reference</h1><!-- doxytag: class="csColor" -->A class used to represent a color in RGB space. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="cscolor_8h-source.html">csutil/cscolor.h</a>></code> <p> <div class="dynheader"> Inheritance diagram for csColor:</div> <div class="dynsection"> <p><center><img src="classcsColor__inherit__graph.png" border="0" usemap="#csColor__inherit__map" alt="Inheritance graph"></center> <map name="csColor__inherit__map"> <area shape="rect" href="classcsColor4.html" title="A class used to represent a color in RGBA space." alt="" coords="5,84,83,111"></map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> <p> <a href="classcsColor-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#0084e967276ae226c03bcd9515a52591">Add</a> (float r, float g, float b)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Add given R,G,B components to color. <a href="#0084e967276ae226c03bcd9515a52591"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#f8492e4c98f57aad84af59a93ab8a337">Clamp</a> (float r, float g, float b)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Clamp color to given R,G,B values. <a href="#f8492e4c98f57aad84af59a93ab8a337"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#ab5ba9cd98c126418db219695fac9fed">ClampDown</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Make sure color components are not negative. <a href="#ab5ba9cd98c126418db219695fac9fed"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#d67b3208bf4bd5b24fe135830ba4d5d8">csColor</a> (const <a class="el" href="classcsColor.html">csColor</a> &c)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize a color object with an existing color. <a href="#d67b3208bf4bd5b24fe135830ba4d5d8"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#4833c29d11ac519fc5051618127f3308">csColor</a> (float v)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize a color object with same content in R,G,B components. <a href="#4833c29d11ac519fc5051618127f3308"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#29edef1cdd26b27f86ecbca86353294e">csColor</a> (float r, float g, float b)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize a color object with given R,G,B components. <a href="#29edef1cdd26b27f86ecbca86353294e"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#9d6d44543c2e4022d581a56f06160c2e">csColor</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize a color object (contents undefined). <a href="#9d6d44543c2e4022d581a56f06160c2e"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#de21140b883b681492d23f34dcdbc519">IsBlack</a> (float threshold) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Check if color is all black (red green and blue all below threshold). <a href="#de21140b883b681492d23f34dcdbc519"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#896ef00a44c0c3d167c016e4eae468eb">IsBlack</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Check if color is all black (red green and blue all 0). <a href="#896ef00a44c0c3d167c016e4eae468eb"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#ef32cf4b561beb5a27873e6bbd30b103">Luminance</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return luminance of pixel (assuming sRGB color space). <a href="#ef32cf4b561beb5a27873e6bbd30b103"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsColor.html">csColor</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#dfb9b8a3a13a132dcaa0d4e103d2946d">operator *</a> (const float f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiply this color by a scalar, return result. <a href="#dfb9b8a3a13a132dcaa0d4e103d2946d"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsColor.html">csColor</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#ad56e483f94ccdfd42094100a67c6342">operator *=</a> (const <a class="el" href="classcsColor.html">csColor</a> &c)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiply another color with this one. <a href="#ad56e483f94ccdfd42094100a67c6342"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsColor.html">csColor</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#2431697e3aa61ce56c4b42dc1aef5d33">operator *=</a> (float f)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiply this color by a scalar value. <a href="#2431697e3aa61ce56c4b42dc1aef5d33"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#594f40443b6a7c9790c42fd8eb9294e1">operator!=</a> (const <a class="el" href="classcsColor.html">csColor</a> &c) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Compare inequality of two colors. <a href="#594f40443b6a7c9790c42fd8eb9294e1"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsColor.html">csColor</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#6f62d2e42c255b3b922534d94eb7da10">operator+=</a> (const <a class="el" href="classcsColor.html">csColor</a> &c)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Add another color to this one. <a href="#6f62d2e42c255b3b922534d94eb7da10"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsColor.html">csColor</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#96a57c0a9dcb3abeff7717ddd9badab2">operator-=</a> (const <a class="el" href="classcsColor.html">csColor</a> &c)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Subtract another color to this one. <a href="#96a57c0a9dcb3abeff7717ddd9badab2"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classcsColor.html">csColor</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#f0e2c176bdcf8423563e86bb534308b6">operator=</a> (const <a class="el" href="classcsColor.html">csColor</a> &c)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Assign one color object to another. <a href="#f0e2c176bdcf8423563e86bb534308b6"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#f4ced8ced1fddb9fd45841c232039564">operator==</a> (const <a class="el" href="classcsColor.html">csColor</a> &c) const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Compare equality of two colors. <a href="#f4ced8ced1fddb9fd45841c232039564"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#c46ba351ead9db574cdadedd87b000b1">Set</a> (const <a class="el" href="classcsColor.html">csColor</a> &c)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set color to given color. <a href="#c46ba351ead9db574cdadedd87b000b1"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#705bb8735d41b549cef0aaed2d4be64a">Set</a> (float r, float g, float b)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set color to given R,G,B components. <a href="#705bb8735d41b549cef0aaed2d4be64a"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#7a8ce895e2b9f6c4a85932512106bb77">Subtract</a> (float r, float g, float b)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Subtract given R,G,B components from color. <a href="#7a8ce895e2b9f6c4a85932512106bb77"></a><br></td></tr> <tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#7dff94c0463a3cfe0109e9fb9eac07bd">blue</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Blue (0..1). <a href="#7dff94c0463a3cfe0109e9fb9eac07bd"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#bc1be0bd770b587f46dc8debb5e336ec">green</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Green (0..1). <a href="#bc1be0bd770b587f46dc8debb5e336ec"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsColor.html#96e49f0be7a6642163bf9b4c41be7d34">red</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Red (0..1). <a href="#96e49f0be7a6642163bf9b4c41be7d34"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> A class used to represent a color in RGB space. <p> This class is similar to <a class="el" href="structcsRGBpixel.html" title="An RGB pixel.">csRGBpixel</a> and <a class="el" href="structcsRGBcolor.html" title="An RGB color.">csRGBcolor</a> except that it uses floating-point values to store R,G,B values. <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00033">33</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="9d6d44543c2e4022d581a56f06160c2e"></a><!-- doxytag: member="csColor::csColor" ref="9d6d44543c2e4022d581a56f06160c2e" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">csColor::csColor </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Initialize a color object (contents undefined). <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00044">44</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> </div> </div><p> <a class="anchor" name="29edef1cdd26b27f86ecbca86353294e"></a><!-- doxytag: member="csColor::csColor" ref="29edef1cdd26b27f86ecbca86353294e" args="(float r, float g, float b)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">csColor::csColor </td> <td>(</td> <td class="paramtype">float </td> <td class="paramname"> <em>r</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>g</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>b</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Initialize a color object with given R,G,B components. <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00046">46</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> </div> </div><p> <a class="anchor" name="4833c29d11ac519fc5051618127f3308"></a><!-- doxytag: member="csColor::csColor" ref="4833c29d11ac519fc5051618127f3308" args="(float v)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">csColor::csColor </td> <td>(</td> <td class="paramtype">float </td> <td class="paramname"> <em>v</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Initialize a color object with same content in R,G,B components. <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00049">49</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> </div> </div><p> <a class="anchor" name="d67b3208bf4bd5b24fe135830ba4d5d8"></a><!-- doxytag: member="csColor::csColor" ref="d67b3208bf4bd5b24fe135830ba4d5d8" args="(const csColor &c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">csColor::csColor </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsColor.html">csColor</a> & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Initialize a color object with an existing color. <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00052">52</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="0084e967276ae226c03bcd9515a52591"></a><!-- doxytag: member="csColor::Add" ref="0084e967276ae226c03bcd9515a52591" args="(float r, float g, float b)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void csColor::Add </td> <td>(</td> <td class="paramtype">float </td> <td class="paramname"> <em>r</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>g</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>b</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Add given R,G,B components to color. <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00115">115</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="f8492e4c98f57aad84af59a93ab8a337"></a><!-- doxytag: member="csColor::Clamp" ref="f8492e4c98f57aad84af59a93ab8a337" args="(float r, float g, float b)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void csColor::Clamp </td> <td>(</td> <td class="paramtype">float </td> <td class="paramname"> <em>r</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>g</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>b</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Clamp color to given R,G,B values. <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00061">61</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="ab5ba9cd98c126418db219695fac9fed"></a><!-- doxytag: member="csColor::ClampDown" ref="ab5ba9cd98c126418db219695fac9fed" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void csColor::ClampDown </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Make sure color components are not negative. <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00068">68</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="de21140b883b681492d23f34dcdbc519"></a><!-- doxytag: member="csColor::IsBlack" ref="de21140b883b681492d23f34dcdbc519" args="(float threshold) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool csColor::IsBlack </td> <td>(</td> <td class="paramtype">float </td> <td class="paramname"> <em>threshold</em> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Check if color is all black (red green and blue all below threshold). <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00080">80</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="896ef00a44c0c3d167c016e4eae468eb"></a><!-- doxytag: member="csColor::IsBlack" ref="896ef00a44c0c3d167c016e4eae468eb" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool csColor::IsBlack </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Check if color is all black (red green and blue all 0). <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00075">75</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="ef32cf4b561beb5a27873e6bbd30b103"></a><!-- doxytag: member="csColor::Luminance" ref="ef32cf4b561beb5a27873e6bbd30b103" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float csColor::Luminance </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Return luminance of pixel (assuming sRGB color space). <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00121">121</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="dfb9b8a3a13a132dcaa0d4e103d2946d"></a><!-- doxytag: member="csColor::operator *" ref="dfb9b8a3a13a132dcaa0d4e103d2946d" args="(const float f)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcsColor.html">csColor</a> csColor::operator * </td> <td>(</td> <td class="paramtype">const float </td> <td class="paramname"> <em>f</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Multiply this color by a scalar, return result. <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00100">100</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="ad56e483f94ccdfd42094100a67c6342"></a><!-- doxytag: member="csColor::operator *=" ref="ad56e483f94ccdfd42094100a67c6342" args="(const csColor &c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcsColor.html">csColor</a>& csColor::operator *= </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsColor.html">csColor</a> & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Multiply another color with this one. <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00097">97</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="2431697e3aa61ce56c4b42dc1aef5d33"></a><!-- doxytag: member="csColor::operator *=" ref="2431697e3aa61ce56c4b42dc1aef5d33" args="(float f)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcsColor.html">csColor</a>& csColor::operator *= </td> <td>(</td> <td class="paramtype">float </td> <td class="paramname"> <em>f</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Multiply this color by a scalar value. <p> <p>Reimplemented in <a class="el" href="classcsColor4.html#1d0ffb22ce614a469b39c642ea4fe326">csColor4</a>.</p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00088">88</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="594f40443b6a7c9790c42fd8eb9294e1"></a><!-- doxytag: member="csColor::operator!=" ref="594f40443b6a7c9790c42fd8eb9294e1" args="(const csColor &c) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool csColor::operator!= </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsColor.html">csColor</a> & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Compare inequality of two colors. <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00112">112</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="6f62d2e42c255b3b922534d94eb7da10"></a><!-- doxytag: member="csColor::operator+=" ref="6f62d2e42c255b3b922534d94eb7da10" args="(const csColor &c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcsColor.html">csColor</a>& csColor::operator+= </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsColor.html">csColor</a> & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Add another color to this one. <p> <p>Reimplemented in <a class="el" href="classcsColor4.html#1874db76d4c9dd01c00d95449b3c908d">csColor4</a>.</p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00091">91</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="96a57c0a9dcb3abeff7717ddd9badab2"></a><!-- doxytag: member="csColor::operator-=" ref="96a57c0a9dcb3abeff7717ddd9badab2" args="(const csColor &c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcsColor.html">csColor</a>& csColor::operator-= </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsColor.html">csColor</a> & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Subtract another color to this one. <p> <p>Reimplemented in <a class="el" href="classcsColor4.html#8be0b53cca22db4d652fac6f98512b21">csColor4</a>.</p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00094">94</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="f0e2c176bdcf8423563e86bb534308b6"></a><!-- doxytag: member="csColor::operator=" ref="f0e2c176bdcf8423563e86bb534308b6" args="(const csColor &c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcsColor.html">csColor</a>& csColor::operator= </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsColor.html">csColor</a> & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Assign one color object to another. <p> <p>Reimplemented in <a class="el" href="classcsColor4.html#062d8a2f296846cfc45bdf48ec0b4133">csColor4</a>.</p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00085">85</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="f4ced8ced1fddb9fd45841c232039564"></a><!-- doxytag: member="csColor::operator==" ref="f4ced8ced1fddb9fd45841c232039564" args="(const csColor &c) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool csColor::operator== </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsColor.html">csColor</a> & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Compare equality of two colors. <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00109">109</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="c46ba351ead9db574cdadedd87b000b1"></a><!-- doxytag: member="csColor::Set" ref="c46ba351ead9db574cdadedd87b000b1" args="(const csColor &c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void csColor::Set </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsColor.html">csColor</a> & </td> <td class="paramname"> <em>c</em> </td> <td> ) </td> <td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Set color to given color. <p> <p>Reimplemented in <a class="el" href="classcsColor4.html#93df2f3d27cb4c29b59e4b34d4d603e0">csColor4</a>.</p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00058">58</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <a class="anchor" name="705bb8735d41b549cef0aaed2d4be64a"></a><!-- doxytag: member="csColor::Set" ref="705bb8735d41b549cef0aaed2d4be64a" args="(float r, float g, float b)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void csColor::Set </td> <td>(</td> <td class="paramtype">float </td> <td class="paramname"> <em>r</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>g</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>b</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Set color to given R,G,B components. <p> <p>Reimplemented in <a class="el" href="classcsColor4.html#6e124197f983b933d45b61f969666711">csColor4</a>.</p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00055">55</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> <p>Referenced by <a class="el" href="shadervar_8h-source.html#l00250">csShaderVariable::GetValue()</a>.</p> </div> </div><p> <a class="anchor" name="7a8ce895e2b9f6c4a85932512106bb77"></a><!-- doxytag: member="csColor::Subtract" ref="7a8ce895e2b9f6c4a85932512106bb77" args="(float r, float g, float b)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void csColor::Subtract </td> <td>(</td> <td class="paramtype">float </td> <td class="paramname"> <em>r</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>g</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">float </td> <td class="paramname"> <em>b</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Subtract given R,G,B components from color. <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00118">118</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>References <a class="el" href="cscolor_8h-source.html#l00041">blue</a>, <a class="el" href="cscolor_8h-source.html#l00039">green</a>, and <a class="el" href="cscolor_8h-source.html#l00037">red</a>.</p> </div> </div><p> <hr><h2>Member Data Documentation</h2> <a class="anchor" name="7dff94c0463a3cfe0109e9fb9eac07bd"></a><!-- doxytag: member="csColor::blue" ref="7dff94c0463a3cfe0109e9fb9eac07bd" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float <a class="el" href="classcsColor.html#7dff94c0463a3cfe0109e9fb9eac07bd">csColor::blue</a> </td> </tr> </table> </div> <div class="memdoc"> <p> Blue (0..1). <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00041">41</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>Referenced by <a class="el" href="cscolor_8h-source.html#l00115">Add()</a>, <a class="el" href="cscolor_8h-source.html#l00061">Clamp()</a>, <a class="el" href="cscolor_8h-source.html#l00068">ClampDown()</a>, <a class="el" href="cscolor_8h-source.html#l00052">csColor()</a>, <a class="el" href="cscolor_8h-source.html#l00075">IsBlack()</a>, <a class="el" href="cscolor_8h-source.html#l00121">Luminance()</a>, <a class="el" href="cscolor_8h-source.html#l00129">operator *()</a>, <a class="el" href="cscolor_8h-source.html#l00100">operator *()</a>, <a class="el" href="cscolor_8h-source.html#l00208">csColor4::operator *=()</a>, <a class="el" href="cscolor_8h-source.html#l00088">operator *=()</a>, <a class="el" href="cscolor_8h-source.html#l00243">csColor4::operator!=()</a>, <a class="el" href="cscolor_8h-source.html#l00112">operator!=()</a>, <a class="el" href="cscolor_8h-source.html#l00211">csColor4::operator+=()</a>, <a class="el" href="cscolor_8h-source.html#l00091">operator+=()</a>, <a class="el" href="cscolor_8h-source.html#l00223">csColor4::operator-=()</a>, <a class="el" href="cscolor_8h-source.html#l00094">operator-=()</a>, <a class="el" href="cscolor_8h-source.html#l00126">operator/()</a>, <a class="el" href="cscolor_8h-source.html#l00196">csColor4::operator=()</a>, <a class="el" href="cscolor_8h-source.html#l00085">operator=()</a>, <a class="el" href="cscolor_8h-source.html#l00235">csColor4::operator==()</a>, <a class="el" href="cscolor_8h-source.html#l00109">operator==()</a>, <a class="el" href="cscolor_8h-source.html#l00167">csColor4::Set()</a>, <a class="el" href="cscolor_8h-source.html#l00055">Set()</a>, <a class="el" href="shadervar_8h-source.html#l00379">csShaderVariable::SetValue()</a>, and <a class="el" href="cscolor_8h-source.html#l00118">Subtract()</a>.</p> </div> </div><p> <a class="anchor" name="bc1be0bd770b587f46dc8debb5e336ec"></a><!-- doxytag: member="csColor::green" ref="bc1be0bd770b587f46dc8debb5e336ec" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float <a class="el" href="classcsColor.html#bc1be0bd770b587f46dc8debb5e336ec">csColor::green</a> </td> </tr> </table> </div> <div class="memdoc"> <p> Green (0..1). <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00039">39</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>Referenced by <a class="el" href="cscolor_8h-source.html#l00115">Add()</a>, <a class="el" href="cscolor_8h-source.html#l00061">Clamp()</a>, <a class="el" href="cscolor_8h-source.html#l00068">ClampDown()</a>, <a class="el" href="cscolor_8h-source.html#l00052">csColor()</a>, <a class="el" href="cscolor_8h-source.html#l00075">IsBlack()</a>, <a class="el" href="cscolor_8h-source.html#l00121">Luminance()</a>, <a class="el" href="cscolor_8h-source.html#l00129">operator *()</a>, <a class="el" href="cscolor_8h-source.html#l00100">operator *()</a>, <a class="el" href="cscolor_8h-source.html#l00208">csColor4::operator *=()</a>, <a class="el" href="cscolor_8h-source.html#l00088">operator *=()</a>, <a class="el" href="cscolor_8h-source.html#l00243">csColor4::operator!=()</a>, <a class="el" href="cscolor_8h-source.html#l00112">operator!=()</a>, <a class="el" href="cscolor_8h-source.html#l00211">csColor4::operator+=()</a>, <a class="el" href="cscolor_8h-source.html#l00091">operator+=()</a>, <a class="el" href="cscolor_8h-source.html#l00223">csColor4::operator-=()</a>, <a class="el" href="cscolor_8h-source.html#l00094">operator-=()</a>, <a class="el" href="cscolor_8h-source.html#l00126">operator/()</a>, <a class="el" href="cscolor_8h-source.html#l00196">csColor4::operator=()</a>, <a class="el" href="cscolor_8h-source.html#l00085">operator=()</a>, <a class="el" href="cscolor_8h-source.html#l00235">csColor4::operator==()</a>, <a class="el" href="cscolor_8h-source.html#l00109">operator==()</a>, <a class="el" href="cscolor_8h-source.html#l00167">csColor4::Set()</a>, <a class="el" href="cscolor_8h-source.html#l00055">Set()</a>, <a class="el" href="shadervar_8h-source.html#l00379">csShaderVariable::SetValue()</a>, and <a class="el" href="cscolor_8h-source.html#l00118">Subtract()</a>.</p> </div> </div><p> <a class="anchor" name="96e49f0be7a6642163bf9b4c41be7d34"></a><!-- doxytag: member="csColor::red" ref="96e49f0be7a6642163bf9b4c41be7d34" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">float <a class="el" href="classcsColor.html#96e49f0be7a6642163bf9b4c41be7d34">csColor::red</a> </td> </tr> </table> </div> <div class="memdoc"> <p> Red (0..1). <p> <p>Definition at line <a class="el" href="cscolor_8h-source.html#l00037">37</a> of file <a class="el" href="cscolor_8h-source.html">cscolor.h</a>.</p> <p>Referenced by <a class="el" href="cscolor_8h-source.html#l00115">Add()</a>, <a class="el" href="cscolor_8h-source.html#l00061">Clamp()</a>, <a class="el" href="cscolor_8h-source.html#l00068">ClampDown()</a>, <a class="el" href="cscolor_8h-source.html#l00052">csColor()</a>, <a class="el" href="cscolor_8h-source.html#l00075">IsBlack()</a>, <a class="el" href="cscolor_8h-source.html#l00121">Luminance()</a>, <a class="el" href="cscolor_8h-source.html#l00129">operator *()</a>, <a class="el" href="cscolor_8h-source.html#l00100">operator *()</a>, <a class="el" href="cscolor_8h-source.html#l00208">csColor4::operator *=()</a>, <a class="el" href="cscolor_8h-source.html#l00088">operator *=()</a>, <a class="el" href="cscolor_8h-source.html#l00243">csColor4::operator!=()</a>, <a class="el" href="cscolor_8h-source.html#l00112">operator!=()</a>, <a class="el" href="cscolor_8h-source.html#l00211">csColor4::operator+=()</a>, <a class="el" href="cscolor_8h-source.html#l00091">operator+=()</a>, <a class="el" href="cscolor_8h-source.html#l00223">csColor4::operator-=()</a>, <a class="el" href="cscolor_8h-source.html#l00094">operator-=()</a>, <a class="el" href="cscolor_8h-source.html#l00126">operator/()</a>, <a class="el" href="cscolor_8h-source.html#l00196">csColor4::operator=()</a>, <a class="el" href="cscolor_8h-source.html#l00085">operator=()</a>, <a class="el" href="cscolor_8h-source.html#l00235">csColor4::operator==()</a>, <a class="el" href="cscolor_8h-source.html#l00109">operator==()</a>, <a class="el" href="cscolor_8h-source.html#l00167">csColor4::Set()</a>, <a class="el" href="cscolor_8h-source.html#l00055">Set()</a>, <a class="el" href="shadervar_8h-source.html#l00379">csShaderVariable::SetValue()</a>, and <a class="el" href="cscolor_8h-source.html#l00118">Subtract()</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li>csutil/<a class="el" href="cscolor_8h-source.html">cscolor.h</a></ul> <hr size="1"><address><small>Generated for Crystal Space 1.2.1 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 </small></address> </div></body> </html>