libosmscout  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups
osmscout::Color Class Reference

#include <Color.h>

Public Member Functions

 Color ()
 
 Color (double r, double g, double b, double a)
 
 Color (double r, double g, double b)
 
 Color (const Color &other)
 
Color Darken (double factor) const
 
double GetA () const
 
double GetB () const
 
double GetG () const
 
double GetR () const
 
bool IsSolid () const
 
bool IsVisible () const
 
Color Lighten (double factor) const
 
bool operator!= (const Color &other) const
 
bool operator< (const Color &other) const
 
Coloroperator= (const Color &other)
 
bool operator== (const Color &other) const
 
std::string ToHexString () const
 

Static Public Member Functions

static Color FromHexString (const std::string &hexString)
 Convert the given color string to a color value. More...
 

Static Public Attributes

static const Color BLACK
 
static const Color BLUE
 
static const Color GREEN
 
static const Color RED
 
static const Color WHITE
 

Constructor & Destructor Documentation

osmscout::Color::Color ( )
inline

Referenced by FromHexString().

osmscout::Color::Color ( double  r,
double  g,
double  b,
double  a 
)
inline
osmscout::Color::Color ( double  r,
double  g,
double  b 
)
inline
osmscout::Color::Color ( const Color other)
inline

Member Function Documentation

Color osmscout::Color::Darken ( double  factor) const
inline
Color osmscout::Color::FromHexString ( const std::string &  hexString)
static

Convert the given color string to a color value.

The string must either be of the format

  • #HHHHHH
  • #HHHHHHHH

where '#' is the symbol itself and 'H' represents a hexadecimal value

Parameters
hexString
Returns

References Color(), and osmscout::GetHexValue().

Referenced by osmscout::oss::Parser::COLOR_VALUE().

bool osmscout::Color::IsSolid ( ) const
inline
bool osmscout::Color::IsVisible ( ) const
inline
Color osmscout::Color::Lighten ( double  factor) const
inline
bool osmscout::Color::operator!= ( const Color other) const
inline
bool osmscout::Color::operator< ( const Color other) const
Color& osmscout::Color::operator= ( const Color other)
inline
bool osmscout::Color::operator== ( const Color other) const
inline
std::string osmscout::Color::ToHexString ( ) const

Member Data Documentation

const Color osmscout::Color::BLACK
static
const Color osmscout::Color::BLUE
static
const Color osmscout::Color::GREEN
static
const Color osmscout::Color::RED
static
const Color osmscout::Color::WHITE
static

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