X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fcolor.cpp;h=576b212a35449bfc748942d3a62aaf0c2ec822dc;hb=7f4c7141c21b2d140d1ea249a468b27d29831081;hp=3305eb45f517f1b1ee4a61d74603ab2440551e9c;hpb=ed67b2cf8837fad1816498bc0ed403e8bd6252ca;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/color.cpp b/synfig-core/trunk/src/synfig/color.cpp index 3305eb4..576b212 100644 --- a/synfig-core/trunk/src/synfig/color.cpp +++ b/synfig-core/trunk/src/synfig/color.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #endif @@ -109,6 +110,14 @@ Color::set_hex(String& hex) } } +const String +Color::get_string(void)const +{ + std::ostringstream o; + o << std::fixed << std::setprecision(3) << "#" << get_hex() << " : " << std::setw(6) << a_; + return String(o.str().c_str()); +} + #if 0 Color& Color::rotate_uv(const Angle& theta)const