From 8a72060fadd7474039af0af357109d3f1a3b2895 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Fri, 15 Sep 2006 08:19:03 +0000 Subject: [PATCH] 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 --- include/color.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/color.hpp b/include/color.hpp index dda56cb69..b9f75b600 100644 --- a/include/color.hpp +++ b/include/color.hpp @@ -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;