X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fcolor.cpp;h=576b212a35449bfc748942d3a62aaf0c2ec822dc;hb=2563a81f39d63a860d9bc459715e63afa75023db;hp=3305eb45f517f1b1ee4a61d74603ab2440551e9c;hpb=215f2742c34cedf77a8cd0ffdef8f8b6e95efdfe;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