|  |  |  | Goffice Reference Manual |  | 
|---|---|---|---|---|
                    GONamedColor;
#define             GDK_TO_UINT                         (c)
#define             RGB_TO_UINT                         (r,g,b)
#define             RGB_TO_RGBA                         (x,a)
#define             RGB_WHITE
#define             RGB_BLACK
#define             RGB_RED
#define             RGB_GREEN
#define             RGB_BLUE
#define             RGB_YELLOW
#define             RGB_VIOLET
#define             RGB_CYAN
#define             RGB_GREY                            (x)
#define             RGBA_TO_UINT                        (r,g,b,a)
#define             RGBA_WHITE
#define             RGBA_BLACK
#define             RGBA_RED
#define             RGBA_GREEN
#define             RGBA_BLUE
#define             RGBA_YELLOW
#define             RGBA_VIOLET
#define             RGBA_CYAN
#define             RGBA_GREY                           (x)
#define             UINT_RGBA_R                         (x)
#define             UINT_RGBA_G                         (x)
#define             UINT_RGBA_B                         (x)
#define             UINT_RGBA_A                         (x)
#define             UINT_RGBA_CHANGE_R                  (x, r)
#define             UINT_RGBA_CHANGE_G                  (x, g)
#define             UINT_RGBA_CHANGE_B                  (x, b)
#define             UINT_RGBA_CHANGE_A                  (x, a)
#define             UINT_TO_RGB                         (u,r,g,b)
#define             UINT_TO_RGBA                        (u,r,g,b,a)
#define             MONO_INTERPOLATE                    (v1, v2, t)
#define             UINT_INTERPOLATE                    (c1, c2, t)
#define             PIXEL_RGB                           (p, r, g, b)
#define             PIXEL_RGBA                          (p, r, g, b, a)
#define             PIXEL_RGB_UINT                      (p, i)
#define             PIXEL_RGBA_UINT                     (p, i)
#define             PIXEL_BLACK                         (p)
#define             PIXEL_WHITE                         (p)
#define             PIXEL_GREY                          (p,g)
#define             PIXEL_GREYA                         (p,g,a)
#define             DOUBLE_RGBA_R                       (x)
#define             DOUBLE_RGBA_G                       (x)
#define             DOUBLE_RGBA_B                       (x)
#define             DOUBLE_RGBA_A                       (x)
#define             GO_COLOR_TO_CAIRO                   (x)
gboolean            go_color_from_str                   (char const *str,
                                                         GOColor *res);
gchar*              go_color_as_str                     (GOColor color);
PangoAttribute*     go_color_to_pango                   (GOColor color,
                                                         gboolean is_fore);
GdkColor*           go_color_to_gdk                     (GOColor color,
                                                         GdkColor *res);
typedef struct {
	GOColor		 color;
	char const 	*name;	/* english name - eg. "white" */
} GONamedColor;
#define GDK_TO_UINT(c) RGBA_TO_UINT(((c).red>>8), ((c).green>>8), ((c).blue>>8), 0xff)
| 
 | 
#define RGB_TO_UINT(r,g,b) ((((guint)(r))<<16)|(((guint)(g))<<8)|((guint)(b)))
| 
 | |
| 
 | |
| 
 | 
#define RGBA_TO_UINT(r,g,b,a) ((((guint)(r))<<24)|(((guint)(g))<<16)|(((guint)(b))<<8)|(guint)(a))
| 
 | |
| 
 | |
| 
 | |
| 
 | 
#define UINT_RGBA_CHANGE_R(x, r) (((x)&(~(0xff<<24)))|(((r)&0xff)<<24))
| 
 | |
| 
 | 
#define UINT_RGBA_CHANGE_G(x, g) (((x)&(~(0xff<<16)))|(((g)&0xff)<<16))
| 
 | |
| 
 | 
#define MONO_INTERPOLATE(v1, v2, t) ((gint)go_rint((v2)*(t)+(v1)*(1-(t))))
| 
 | |
| 
 | |
| 
 | 
#define GO_COLOR_TO_CAIRO(x) DOUBLE_RGBA_R(x),DOUBLE_RGBA_G(x),DOUBLE_RGBA_B(x),DOUBLE_RGBA_A(x)
| 
 | 
gboolean            go_color_from_str                   (char const *str,
                                                         GOColor *res);
| 
 | |
| 
 | |
| Returns : | TRUE if strcan be parsed as a color of the form R:G:B:A and the
	result is stored inres. | 
PangoAttribute*     go_color_to_pango                   (GOColor color,
                                                         gboolean is_fore);
| 
 | |
| 
 | |
| Returns : |