MWAWColor Struct Reference

the class to store a color More...

#include <libmwaw_internal.hxx>

Public Member Functions

 MWAWColor (uint32_t argb=0)
 constructor More...
 
 MWAWColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a=0)
 constructor from color More...
 
MWAWColoroperator= (uint32_t argb)
 operator= More...
 
uint32_t value () const
 return the rgba value More...
 
bool isBlack () const
 return true if the color is black More...
 
bool isWhite () const
 return true if the color is white More...
 
bool operator== (MWAWColor const &c) const
 operator== More...
 
bool operator!= (MWAWColor const &c) const
 operator!= More...
 
bool operator< (MWAWColor const &c) const
 operator< More...
 
bool operator<= (MWAWColor const &c) const
 operator<= More...
 
bool operator> (MWAWColor const &c) const
 operator> More...
 
bool operator>= (MWAWColor const &c) const
 operator>= More...
 
std::string str () const
 print the color in the form #rrggbb More...
 

Static Public Member Functions

static MWAWColor black ()
 return the back color More...
 
static MWAWColor white ()
 return the white color More...
 
static MWAWColor barycenter (float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
 return alpha*colA+beta*colB More...
 

Protected Attributes

uint32_t m_value
 the argb color More...
 

Friends

std::ostream & operator<< (std::ostream &o, MWAWColor const &c)
 operator<< in the form #rrggbb More...
 

Detailed Description

the class to store a color

Constructor & Destructor Documentation

MWAWColor::MWAWColor ( uint32_t  argb = 0)
inline

constructor

Referenced by black(), and white().

MWAWColor::MWAWColor ( unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a = 0 
)
inline

constructor from color

Member Function Documentation

bool MWAWColor::operator!= ( MWAWColor const &  c) const
inline

operator!=

bool MWAWColor::operator< ( MWAWColor const &  c) const
inline

operator<

Referenced by operator>=().

bool MWAWColor::operator<= ( MWAWColor const &  c) const
inline

operator<=

Referenced by operator>().

MWAWColor& MWAWColor::operator= ( uint32_t  argb)
inline

operator=

bool MWAWColor::operator== ( MWAWColor const &  c) const
inline

operator==

Referenced by operator!=().

bool MWAWColor::operator> ( MWAWColor const &  c) const
inline

operator>

bool MWAWColor::operator>= ( MWAWColor const &  c) const
inline

operator>=

uint32_t MWAWColor::value ( ) const
inline

return the rgba value

Referenced by getPPMData().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
MWAWColor const &  c 
)
friend

operator<< in the form #rrggbb

Member Data Documentation

uint32_t MWAWColor::m_value
protected

The documentation for this struct was generated from the following files:

Generated on Tue Mar 10 2015 17:32:09 for libmwaw by doxygen 1.8.5