X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fcolor.h;h=35e2857005ff4be11d2b362d75c0b492f1537be5;hb=356a1d6958810ca98dbb433af9afb13cf916091b;hp=447bd5632e4584decf506dd605f3b10e8f525c38;hpb=215f2742c34cedf77a8cd0ffdef8f8b6e95efdfe;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/color.h b/synfig-core/trunk/src/synfig/color.h index 447bd56..35e2857 100644 --- a/synfig-core/trunk/src/synfig/color.h +++ b/synfig-core/trunk/src/synfig/color.h @@ -28,11 +28,6 @@ /* === H E A D E R S ======================================================= */ -#include -#include -#include -#include - //#include #include #include @@ -49,6 +44,11 @@ /* === M A C R O S ========================================================= */ +#define use_colorspace_gamma() App::use_colorspace_gamma +#define colorspace_gamma() (2.2f) +#define gamma_in(x) ((x>=0)?pow((float)x,1.0f/colorspace_gamma()):-pow((float)-x,1.0f/colorspace_gamma())) +#define gamma_out(x) ((x>=0)?pow((float)x,colorspace_gamma()):-pow((float)-x,colorspace_gamma())) + #ifdef WIN32 #include #ifndef isnan @@ -115,12 +115,7 @@ private: public: - inline const String 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()); - } + const String get_string(void)const; Color & operator+=(const Color &rhs)