// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//

BALL_INLINE 
void ColorRGBA::setRed(const ColorUnit& red)
{
  red_ = red;
}

BALL_INLINE 
ColorUnit& ColorRGBA::getRed()
{
  return red_;
}

BALL_INLINE 
const ColorUnit& ColorRGBA::getRed() const
{
  return red_;
}

BALL_INLINE 
void ColorRGBA::setGreen(const ColorUnit& green)
{
  green_ = green;
}

BALL_INLINE 
ColorUnit& ColorRGBA::getGreen()
{
  return green_;
}

BALL_INLINE 
const ColorUnit& ColorRGBA::getGreen() const
{
  return green_;
}

BALL_INLINE 
void ColorRGBA::setBlue(const ColorUnit& blue)
{
  blue_ = blue;
}

BALL_INLINE 
ColorUnit& ColorRGBA::getBlue()
{
  return blue_;
}

BALL_INLINE 
const ColorUnit& ColorRGBA::getBlue() const
{
  return blue_;
}

BALL_INLINE 
void ColorRGBA::setAlpha(const ColorUnit& alpha)
{
  alpha_ = alpha;
}

BALL_INLINE 
ColorUnit& ColorRGBA::getAlpha()
{
  return alpha_;
}

BALL_INLINE 
const ColorUnit& ColorRGBA::getAlpha() const
{
  return alpha_;
}

BALL_INLINE 
void ColorRGBA::set
  (const ColorUnit& red, const ColorUnit& green,
   const ColorUnit& blue, const ColorUnit& alpha)
{
  red_   = red;
  green_ = green;
  blue_  = blue;
  alpha_ = alpha;
}

BALL_INLINE 
void ColorRGBA::get
  (ColorUnit& red, ColorUnit& green,
   ColorUnit& blue, ColorUnit& alpha) const
{
  red   = red_;
  green = green_;
  blue  = blue_;
  alpha = alpha_;
}

BALL_INLINE 
void ColorRGBA::get
  (ColorUnit& red,
   ColorUnit& green,
   ColorUnit& blue) const
{
  red   = red_;
  green = green_;
  blue  = blue_;
}

BALL_INLINE 
bool ColorRGBA::operator == (const ColorRGBA& color) const
{
  return (bool)(red_ == color.red_ && green_ == color.green_
								&& blue_ == color.blue_ && alpha_ == color.alpha_);
}

BALL_INLINE 
bool ColorRGBA::operator != (const ColorRGBA& color) const
{
  return (bool)!(this->operator==(color));
}

BALL_INLINE 
bool ColorRGBA::operator < (const ColorRGBA& color) const
{
  return (bool)(red_ < color.red_ && green_ < color.green_
								&& blue_ < color.blue_ && alpha_ < color.alpha_);
}

BALL_INLINE 
bool ColorRGBA::operator > (const ColorRGBA& color) const
{
  return (bool)(red_ > color.red_ && green_ > color.green_
								&& blue_ > color.blue_ && alpha_ > color.alpha_);
}

BALL_INLINE 
bool ColorRGBA::operator <= (const ColorRGBA& color) const
{
  return (bool)!(this->operator>(color));
}

BALL_INLINE 
bool ColorRGBA::operator >= (const ColorRGBA& color) const
{
  return (bool)!(this->operator<(color));  
}

