CVD 0.8
Public Member Functions | Public Attributes | Related Functions
CVD::La< T > Class Template Reference

A colour consisting of luminance and alpha components. More...

#include <la.h>

List of all members.

Public Member Functions

 La ()
 La (T l, T a)
La< T > & operator= (const La< T > &c)
template<typename T2 >
La< T > & operator= (const La< T2 > &c)
bool operator== (const La< T > &c) const
bool operator!= (const La< T > &c) const

Public Attributes

luminance
alpha

Related Functions

(Note that these are not member functions.)

template<typename T >
std::ostream & operator<< (std::ostream &os, const La< T > &x)
std::ostream & operator<< (std::ostream &os, const La< unsigned char > &x)

Detailed Description

template<typename T>
class CVD::La< T >

A colour consisting of luminance and alpha components.

Parameters:
TThe datatype of each component

Definition at line 38 of file la.h.


Constructor & Destructor Documentation

template<typename T>
CVD::La< T >::La ( l,
a 
) [inline]

Constructs a colour as specified.

Parameters:
lThe luminance component
aThe alpha component

Definition at line 46 of file la.h.


Member Function Documentation

template<typename T>
La<T>& CVD::La< T >::operator= ( const La< T > &  c) [inline]

Assignment operator.

Parameters:
cThe colour to copy from

Definition at line 53 of file la.h.

References CVD::La< T >::alpha, and CVD::La< T >::luminance.

template<typename T>
template<typename T2 >
La<T>& CVD::La< T >::operator= ( const La< T2 > &  c) [inline]

Assignment operator between two different storage types, using the standard casts as necessary.

Parameters:
cThe colour to copy from

Definition at line 59 of file la.h.

References CVD::La< T >::alpha, and CVD::La< T >::luminance.

template<typename T>
bool CVD::La< T >::operator== ( const La< T > &  c) const [inline]

Logical equals operator.

Returns true if each component is the same.

Parameters:
cLa to compare with

Definition at line 67 of file la.h.

References CVD::La< T >::alpha, and CVD::La< T >::luminance.

template<typename T>
bool CVD::La< T >::operator!= ( const La< T > &  c) const [inline]

Logical not-equals operator.

Returns true unless each component is the same.

Parameters:
cLa to compare with

Definition at line 72 of file la.h.

References CVD::La< T >::alpha, and CVD::La< T >::luminance.


Friends And Related Function Documentation

template<typename T >
std::ostream & operator<< ( std::ostream &  os,
const La< T > &  x 
) [related]

Write the colour to a stream in the format "(luminance,alpha)".

Parameters:
osThe stream
xThe colour object

Definition at line 82 of file la.h.

template<typename T>
std::ostream & operator<< ( std::ostream &  os,
const La< unsigned char > &  x 
) [related]

Write the colour to a stream in the format "(luminance,alpha)".

Parameters:
osThe stream
xThe colour object

Definition at line 91 of file la.h.


The documentation for this class was generated from the following file: