Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bad97183153701b09df5fae1052b1c30 > files > 2680

crystalspace-doc-1.2.1-5mdv2010.0.i586.rpm

<!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: csRGBcolor Struct 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&nbsp;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&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<h1>csRGBcolor Struct Reference<br>
<small>
[<a class="el" href="group__gfx.html">Graphics</a>]</small>
</h1><!-- doxytag: class="csRGBcolor" -->An RGB color.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="rgbpixel_8h-source.html">csgfx/rgbpixel.h</a>&gt;</code>
<p>

<p>
<a href="structcsRGBcolor-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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcsRGBcolor.html#bb0140fc97b6ea54dd308a2686650f60">csRGBcolor</a> (unsigned char r, unsigned char g, unsigned char b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize the color with some R/G/B value.  <a href="#bb0140fc97b6ea54dd308a2686650f60"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcsRGBcolor.html#b36792004650905a595e38c8574218f1">csRGBcolor</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor (initialize to zero).  <a href="#b36792004650905a595e38c8574218f1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcsRGBcolor.html#03b9a932c50e4b2d133da2c5675ec96e">operator!=</a> (const <a class="el" href="structcsRGBcolor.html">csRGBcolor</a> &amp;c) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare with an <a class="el" href="structcsRGBcolor.html" title="An RGB color.">csRGBcolor</a>.  <a href="#03b9a932c50e4b2d133da2c5675ec96e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structcsRGBcolor.html">csRGBcolor</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcsRGBcolor.html#981f1ba8ca1a188b7788824604dde5d5">operator+</a> (const <a class="el" href="structcsRGBcolor.html">csRGBcolor</a> &amp;c) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add two csRGBcolors (may overflow!).  <a href="#981f1ba8ca1a188b7788824604dde5d5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcsRGBcolor.html#ed4235e609a707b78e8389994749a7e2">operator==</a> (const <a class="el" href="structcsRGBcolor.html">csRGBcolor</a> &amp;c) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare with an <a class="el" href="structcsRGBcolor.html" title="An RGB color.">csRGBcolor</a>.  <a href="#ed4235e609a707b78e8389994749a7e2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcsRGBcolor.html#5d5e1d404c4178f9986c390ebeb6b5a0">SafeAdd</a> (const <a class="el" href="structcsRGBcolor.html">csRGBcolor</a> &amp;c)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Use this in the general case.  <a href="#5d5e1d404c4178f9986c390ebeb6b5a0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcsRGBcolor.html#aa98cfc5fe7252ab9e96340048b2dfc5">Set</a> (unsigned char r, unsigned char g, unsigned char b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assign given red/green/blue values to this pixel.  <a href="#aa98cfc5fe7252ab9e96340048b2dfc5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcsRGBcolor.html#0585be6ff29020c94b331bea64b57f69">UnsafeAdd</a> (const <a class="el" href="structcsRGBcolor.html">csRGBcolor</a> &amp;c)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Use this only if you know there is no overflow.  <a href="#0585be6ff29020c94b331bea64b57f69"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7f3c30e3543bea7d2e2be81c5c2830d2"></a><!-- doxytag: member="csRGBcolor::blue" ref="7f3c30e3543bea7d2e2be81c5c2830d2" args="" -->
unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcsRGBcolor.html#7f3c30e3543bea7d2e2be81c5c2830d2">blue</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="540bf2c73388f5d58cd22413b4a88492"></a><!-- doxytag: member="csRGBcolor::green" ref="540bf2c73388f5d58cd22413b4a88492" args="" -->
unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcsRGBcolor.html#540bf2c73388f5d58cd22413b4a88492">green</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structcsRGBcolor.html#98ef2bec4ae039e5ced29749aa863a65">red</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The red, green, blue components.  <a href="#98ef2bec4ae039e5ced29749aa863a65"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
An RGB color. 
<p>
This class is used whenever we need just R, G and B information, such as when defining a color palette. 
<p>Definition at line <a class="el" href="rgbpixel_8h-source.html#l00067">67</a> of file <a class="el" href="rgbpixel_8h-source.html">rgbpixel.h</a>.</p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="b36792004650905a595e38c8574218f1"></a><!-- doxytag: member="csRGBcolor::csRGBcolor" ref="b36792004650905a595e38c8574218f1" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">csRGBcolor::csRGBcolor           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor (initialize to zero). 
<p>

<p>Definition at line <a class="el" href="rgbpixel_8h-source.html#l00072">72</a> of file <a class="el" href="rgbpixel_8h-source.html">rgbpixel.h</a>.</p>

<p>Referenced by <a class="el" href="rgbpixel_8h-source.html#l00086">operator+()</a>.</p>

</div>
</div><p>
<a class="anchor" name="bb0140fc97b6ea54dd308a2686650f60"></a><!-- doxytag: member="csRGBcolor::csRGBcolor" ref="bb0140fc97b6ea54dd308a2686650f60" args="(unsigned char r, unsigned char g, unsigned char b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">csRGBcolor::csRGBcolor           </td>
          <td>(</td>
          <td class="paramtype">unsigned char&nbsp;</td>
          <td class="paramname"> <em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&nbsp;</td>
          <td class="paramname"> <em>g</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&nbsp;</td>
          <td class="paramname"> <em>b</em></td><td>&nbsp;</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 the color with some R/G/B value. 
<p>

<p>Definition at line <a class="el" href="rgbpixel_8h-source.html#l00074">74</a> of file <a class="el" href="rgbpixel_8h-source.html">rgbpixel.h</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="03b9a932c50e4b2d133da2c5675ec96e"></a><!-- doxytag: member="csRGBcolor::operator!=" ref="03b9a932c50e4b2d133da2c5675ec96e" args="(const csRGBcolor &amp;c) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool csRGBcolor::operator!=           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcsRGBcolor.html">csRGBcolor</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>c</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Compare with an <a class="el" href="structcsRGBcolor.html" title="An RGB color.">csRGBcolor</a>. 
<p>

<p>Definition at line <a class="el" href="rgbpixel_8h-source.html#l00083">83</a> of file <a class="el" href="rgbpixel_8h-source.html">rgbpixel.h</a>.</p>

<p>References <a class="el" href="rgbpixel_8h-source.html#l00080">operator==()</a>.</p>

</div>
</div><p>
<a class="anchor" name="981f1ba8ca1a188b7788824604dde5d5"></a><!-- doxytag: member="csRGBcolor::operator+" ref="981f1ba8ca1a188b7788824604dde5d5" args="(const csRGBcolor &amp;c) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcsRGBcolor.html">csRGBcolor</a> csRGBcolor::operator+           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcsRGBcolor.html">csRGBcolor</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>c</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Add two csRGBcolors (may overflow!). 
<p>

<p>Definition at line <a class="el" href="rgbpixel_8h-source.html#l00086">86</a> of file <a class="el" href="rgbpixel_8h-source.html">rgbpixel.h</a>.</p>

<p>References <a class="el" href="rgbpixel_8h-source.html#l00070">blue</a>, <a class="el" href="rgbpixel_8h-source.html#l00072">csRGBcolor()</a>, <a class="el" href="rgbpixel_8h-source.html#l00070">green</a>, and <a class="el" href="rgbpixel_8h-source.html#l00070">red</a>.</p>

</div>
</div><p>
<a class="anchor" name="ed4235e609a707b78e8389994749a7e2"></a><!-- doxytag: member="csRGBcolor::operator==" ref="ed4235e609a707b78e8389994749a7e2" args="(const csRGBcolor &amp;c) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool csRGBcolor::operator==           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcsRGBcolor.html">csRGBcolor</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>c</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Compare with an <a class="el" href="structcsRGBcolor.html" title="An RGB color.">csRGBcolor</a>. 
<p>

<p>Definition at line <a class="el" href="rgbpixel_8h-source.html#l00080">80</a> of file <a class="el" href="rgbpixel_8h-source.html">rgbpixel.h</a>.</p>

<p>References <a class="el" href="rgbpixel_8h-source.html#l00070">blue</a>, <a class="el" href="rgbpixel_8h-source.html#l00070">green</a>, and <a class="el" href="rgbpixel_8h-source.html#l00070">red</a>.</p>

<p>Referenced by <a class="el" href="rgbpixel_8h-source.html#l00083">operator!=()</a>.</p>

</div>
</div><p>
<a class="anchor" name="5d5e1d404c4178f9986c390ebeb6b5a0"></a><!-- doxytag: member="csRGBcolor::SafeAdd" ref="5d5e1d404c4178f9986c390ebeb6b5a0" args="(const csRGBcolor &amp;c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void csRGBcolor::SafeAdd           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcsRGBcolor.html">csRGBcolor</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>c</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Use this in the general case. 
<p>
This version test for overflow. 
<p>Definition at line <a class="el" href="rgbpixel_8h-source.html#l00103">103</a> of file <a class="el" href="rgbpixel_8h-source.html">rgbpixel.h</a>.</p>

<p>References <a class="el" href="rgbpixel_8h-source.html#l00070">blue</a>, <a class="el" href="rgbpixel_8h-source.html#l00070">green</a>, and <a class="el" href="rgbpixel_8h-source.html#l00070">red</a>.</p>

</div>
</div><p>
<a class="anchor" name="aa98cfc5fe7252ab9e96340048b2dfc5"></a><!-- doxytag: member="csRGBcolor::Set" ref="aa98cfc5fe7252ab9e96340048b2dfc5" args="(unsigned char r, unsigned char g, unsigned char b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void csRGBcolor::Set           </td>
          <td>(</td>
          <td class="paramtype">unsigned char&nbsp;</td>
          <td class="paramname"> <em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&nbsp;</td>
          <td class="paramname"> <em>g</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&nbsp;</td>
          <td class="paramname"> <em>b</em></td><td>&nbsp;</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>
Assign given red/green/blue values to this pixel. 
<p>

<p>Definition at line <a class="el" href="rgbpixel_8h-source.html#l00077">77</a> of file <a class="el" href="rgbpixel_8h-source.html">rgbpixel.h</a>.</p>

<p>References <a class="el" href="rgbpixel_8h-source.html#l00070">blue</a>, <a class="el" href="rgbpixel_8h-source.html#l00070">green</a>, and <a class="el" href="rgbpixel_8h-source.html#l00070">red</a>.</p>

</div>
</div><p>
<a class="anchor" name="0585be6ff29020c94b331bea64b57f69"></a><!-- doxytag: member="csRGBcolor::UnsafeAdd" ref="0585be6ff29020c94b331bea64b57f69" args="(const csRGBcolor &amp;c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void csRGBcolor::UnsafeAdd           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcsRGBcolor.html">csRGBcolor</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>c</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Use this only if you know there is no overflow. 
<p>

<p>Definition at line <a class="el" href="rgbpixel_8h-source.html#l00094">94</a> of file <a class="el" href="rgbpixel_8h-source.html">rgbpixel.h</a>.</p>

<p>References <a class="el" href="rgbpixel_8h-source.html#l00070">blue</a>, <a class="el" href="rgbpixel_8h-source.html#l00070">green</a>, and <a class="el" href="rgbpixel_8h-source.html#l00070">red</a>.</p>

</div>
</div><p>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="98ef2bec4ae039e5ced29749aa863a65"></a><!-- doxytag: member="csRGBcolor::red" ref="98ef2bec4ae039e5ced29749aa863a65" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned char <a class="el" href="structcsRGBcolor.html#98ef2bec4ae039e5ced29749aa863a65">csRGBcolor::red</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The red, green, blue components. 
<p>

<p>Definition at line <a class="el" href="rgbpixel_8h-source.html#l00070">70</a> of file <a class="el" href="rgbpixel_8h-source.html">rgbpixel.h</a>.</p>

<p>Referenced by <a class="el" href="rgbpixel_8h-source.html#l00122">csComparator&lt; csRGBcolor, csRGBcolor &gt;::Compare()</a>, <a class="el" href="rgbpixel_8h-source.html#l00086">operator+()</a>, <a class="el" href="rgbpixel_8h-source.html#l00211">csRGBpixel::operator+=()</a>, <a class="el" href="rgbpixel_8h-source.html#l00171">csRGBpixel::operator==()</a>, <a class="el" href="rgbpixel_8h-source.html#l00080">operator==()</a>, <a class="el" href="packrgb_8h-source.html#l00064">csPackRGB::PackRGBcolorToRGBBuffer()</a>, <a class="el" href="rgbpixel_8h-source.html#l00103">SafeAdd()</a>, <a class="el" href="rgbpixel_8h-source.html#l00077">Set()</a>, <a class="el" href="packrgb_8h-source.html#l00364">csPackRGBA::UnpackRGBAtoRGBcolor()</a>, <a class="el" href="packrgb_8h-source.html#l00117">csPackRGB::UnpackRGBtoRGBcolor()</a>, and <a class="el" href="rgbpixel_8h-source.html#l00094">UnsafeAdd()</a>.</p>

</div>
</div><p>
<hr>The documentation for this struct was generated from the following file:<ul>
<li>csgfx/<a class="el" href="rgbpixel_8h-source.html">rgbpixel.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>