added alpha to to_string method.
rgb ( R, B, G, A) TODO: modify CSS color parser to accept alpha channel e.g rgb (R,G,B,A) #RRGGBBAA #RGBA
This commit is contained in:
parent
2d04ce0360
commit
8a72060fad
1 changed files with 7 additions and 2 deletions
|
@ -100,13 +100,18 @@ namespace mapnik {
|
|||
{
|
||||
return abgr_ == other.abgr_;
|
||||
}
|
||||
|
||||
|
||||
inline std::string to_string() const
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "rgb (" << red() << "," << green() << "," << blue() <<")";
|
||||
ss << "rgb ("
|
||||
<< red() << ","
|
||||
<< green() << ","
|
||||
<< blue() << ","
|
||||
<< alpha() << ")";
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
inline std::string to_hex_string() const
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
|
Loading…
Reference in a new issue