mimas::rgba< T > Class Template Reference

#include <rgba.h>

Inheritance diagram for mimas::rgba< T >:

Inheritance graph
[legend]
Collaboration diagram for mimas::rgba< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 rgba (void)
template<class U>
 rgba (const rgba< U > &rhs)
 rgba (T _r, T _g, T _b, T _a=T())
template<typename U>
 rgba (const U &val)
T getRed (void) const
T getGreen (void) const
T getBlue (void) const
T getAlpha (void) const
void setRed (T val)
void setGreen (T val)
void setBlue (T val)
void setAlpha (T val)
void set (T val)
void overlay (T r_, T g_, T b_, T a_)
 operator double (void) const
 operator float (void) const
 operator short int (void) const
 operator int (void) const
 operator unsigned char (void) const
bool operator== (const rgba< T > &rhs)
 Equality of two pixels.
bool operator!= (const rgba< T > &rhs)
 Check for unequal pixels.
rgba< T > operator+ (const rgba< T > &o) const
rgba< T > operator- (const rgba< T > &o) const
rgba< T > & operator+= (const rgba< T > &o)
rgba< T > & operator-= (const rgba< T > &o)
double getHue (void) const
 returns number in the range 0-360
double getSaturation (void) const
 returns saturation between 0 and 1.0

Protected Attributes

T b
T g
T r
T a

Detailed Description

template<typename T>
class mimas::rgba< T >

Definition at line 10 of file rgba.h.


Constructor & Destructor Documentation

template<typename T>
mimas::rgba< T >::rgba ( void   )  [inline]

Definition at line 17 of file rgba.h.

template<typename T>
template<class U>
mimas::rgba< T >::rgba ( const rgba< U > &  rhs  )  [inline]

Definition at line 23 of file rgba.h.

template<typename T>
mimas::rgba< T >::rgba ( T  _r,
T  _g,
T  _b,
T  _a = T() 
) [inline]

Definition at line 31 of file rgba.h.

template<typename T>
template<typename U>
mimas::rgba< T >::rgba ( const U &  val  )  [inline, explicit]

Definition at line 37 of file rgba.h.


Member Function Documentation

template<typename T>
T mimas::rgba< T >::getRed ( void   )  const [inline]

Definition at line 47 of file rgba.h.

Referenced by mimas::rgba< unsigned char >::rgba(), and mimas::mesa_base::setColor().

template<typename T>
T mimas::rgba< T >::getGreen ( void   )  const [inline]

Definition at line 52 of file rgba.h.

Referenced by mimas::rgba< unsigned char >::rgba(), and mimas::mesa_base::setColor().

template<typename T>
T mimas::rgba< T >::getBlue ( void   )  const [inline]

Definition at line 57 of file rgba.h.

Referenced by mimas::rgba< unsigned char >::rgba(), and mimas::mesa_base::setColor().

template<typename T>
T mimas::rgba< T >::getAlpha ( void   )  const [inline]

Definition at line 62 of file rgba.h.

Referenced by mimas::rgba< unsigned char >::rgba().

template<typename T>
void mimas::rgba< T >::setRed ( T  val  )  [inline]

Definition at line 68 of file rgba.h.

template<typename T>
void mimas::rgba< T >::setGreen ( T  val  )  [inline]

Definition at line 73 of file rgba.h.

template<typename T>
void mimas::rgba< T >::setBlue ( T  val  )  [inline]

Definition at line 78 of file rgba.h.

template<typename T>
void mimas::rgba< T >::setAlpha ( T  val  )  [inline]

Definition at line 83 of file rgba.h.

template<typename T>
void mimas::rgba< T >::set ( T  val  )  [inline]

Definition at line 88 of file rgba.h.

template<typename T>
void mimas::rgba< T >::overlay ( T  r_,
T  g_,
T  b_,
T  a_ 
) [inline]

Definition at line 95 of file rgba.h.

template<typename T>
mimas::rgba< T >::operator double ( void   )  const [inline]

Definition at line 105 of file rgba.h.

Referenced by mimas::rgba< unsigned char >::operator int().

template<typename T>
mimas::rgba< T >::operator float ( void   )  const [inline]

Definition at line 111 of file rgba.h.

template<typename T>
mimas::rgba< T >::operator short int ( void   )  const [inline]

Definition at line 117 of file rgba.h.

template<typename T>
mimas::rgba< T >::operator int ( void   )  const [inline]

Definition at line 126 of file rgba.h.

template<typename T>
mimas::rgba< T >::operator unsigned char ( void   )  const [inline]

Definition at line 132 of file rgba.h.

template<typename T>
bool mimas::rgba< T >::operator== ( const rgba< T > &  rhs  )  [inline]

Equality of two pixels.

Definition at line 142 of file rgba.h.

template<typename T>
bool mimas::rgba< T >::operator!= ( const rgba< T > &  rhs  )  [inline]

Check for unequal pixels.

Definition at line 148 of file rgba.h.

template<typename T>
rgba< T > mimas::rgba< T >::operator+ ( const rgba< T > &  o  )  const [inline]

Definition at line 153 of file rgba.h.

template<typename T>
rgba< T > mimas::rgba< T >::operator- ( const rgba< T > &  o  )  const [inline]

Definition at line 158 of file rgba.h.

template<typename T>
rgba< T >& mimas::rgba< T >::operator+= ( const rgba< T > &  o  )  [inline]

Definition at line 163 of file rgba.h.

template<typename T>
rgba< T >& mimas::rgba< T >::operator-= ( const rgba< T > &  o  )  [inline]

Definition at line 169 of file rgba.h.

template<typename T>
double mimas::rgba< T >::getHue ( void   )  const

returns number in the range 0-360

template<typename T>
double mimas::rgba< T >::getSaturation ( void   )  const

returns saturation between 0 and 1.0


Member Data Documentation

template<typename T>
T mimas::rgba< T >::b [protected]

Definition at line 13 of file rgba.h.

Referenced by mimas::rgba< unsigned char >::getBlue(), mimas::rgba< unsigned char >::operator double(), mimas::rgba< unsigned char >::operator float(), mimas::rgba< unsigned char >::operator short int(), mimas::rgba< unsigned char >::operator unsigned char(), mimas::rgba< unsigned char >::operator!=(), mimas::rgba< unsigned char >::operator+(), mimas::rgba< unsigned char >::operator+=(), mimas::rgba< unsigned char >::operator-(), mimas::rgba< unsigned char >::operator-=(), mimas::rgba< unsigned char >::operator==(), mimas::rgba< unsigned char >::overlay(), mimas::rgba< unsigned char >::rgba(), mimas::rgba< unsigned char >::set(), and mimas::rgba< unsigned char >::setBlue().

template<typename T>
T mimas::rgba< T >::g [protected]

Definition at line 13 of file rgba.h.

Referenced by mimas::rgba< unsigned char >::getGreen(), mimas::rgba< unsigned char >::operator double(), mimas::rgba< unsigned char >::operator float(), mimas::rgba< unsigned char >::operator short int(), mimas::rgba< unsigned char >::operator unsigned char(), mimas::rgba< unsigned char >::operator!=(), mimas::rgba< unsigned char >::operator+(), mimas::rgba< unsigned char >::operator+=(), mimas::rgba< unsigned char >::operator-(), mimas::rgba< unsigned char >::operator-=(), mimas::rgba< unsigned char >::operator==(), mimas::rgba< unsigned char >::overlay(), mimas::rgba< unsigned char >::rgba(), mimas::rgba< unsigned char >::set(), and mimas::rgba< unsigned char >::setGreen().

template<typename T>
T mimas::rgba< T >::r [protected]

Definition at line 13 of file rgba.h.

Referenced by mimas::rgba< unsigned char >::getRed(), mimas::rgba< unsigned char >::operator double(), mimas::rgba< unsigned char >::operator float(), mimas::rgba< unsigned char >::operator short int(), mimas::rgba< unsigned char >::operator unsigned char(), mimas::rgba< unsigned char >::operator!=(), mimas::rgba< unsigned char >::operator+(), mimas::rgba< unsigned char >::operator+=(), mimas::rgba< unsigned char >::operator-(), mimas::rgba< unsigned char >::operator-=(), mimas::rgba< unsigned char >::operator==(), mimas::rgba< unsigned char >::overlay(), mimas::rgba< unsigned char >::rgba(), mimas::rgba< unsigned char >::set(), and mimas::rgba< unsigned char >::setRed().

template<typename T>
T mimas::rgba< T >::a [protected]

Definition at line 13 of file rgba.h.

Referenced by mimas::rgba< unsigned char >::getAlpha(), mimas::rgba< unsigned char >::operator!=(), mimas::rgba< unsigned char >::operator==(), mimas::rgba< unsigned char >::rgba(), mimas::rgba< unsigned char >::set(), and mimas::rgba< unsigned char >::setAlpha().


The documentation for this class was generated from the following file:
[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:46 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...