diff --git a/src/color.h b/src/color.h
index e9394360900841a8c4199c9d62679fcad763e381..bebeaec60b4e188bb2dbe7ae8514c6fbb8858b01 100644 (file)
--- a/src/color.h
+++ b/src/color.h
*/
#include <gdk/gdktypes.h>
+#include <string>
/* Useful composition macros */
#define SP_RGBA32_B_U(v) (((v) >> 8) & 0xff)
#define SP_RGBA32_A_U(v) ((v) & 0xff)
#define SP_COLOR_U_TO_F(v) ((v) / 255.0)
-#define SP_COLOR_F_TO_U(v) ((unsigned int) ((v) * 255.9999))
+#define SP_COLOR_F_TO_U(v) ((unsigned int) ((v) * 255. + .5))
#define SP_RGBA32_R_F(v) SP_COLOR_U_TO_F (SP_RGBA32_R_U (v))
#define SP_RGBA32_G_F(v) SP_COLOR_U_TO_F (SP_RGBA32_G_U (v))
#define SP_RGBA32_B_F(v) SP_COLOR_U_TO_F (SP_RGBA32_B_U (v))
SPColor( SPColor const& other );
SPColor( float r, float g, float b );
SPColor( guint32 value );
- ~SPColor();
+ virtual ~SPColor();
SPColor& operator= (SPColor const& other);
guint32 toRGBA32( gint alpha ) const;
guint32 toRGBA32( gdouble alpha ) const;
+ std::string toString() const;
+
SVGICCColor* icc;
union {
float c[3];