Mercurial > MadButterfly
diff src/paint.c @ 52:59a295651480
Add action mb_chgcolor_t to change color of paints.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sat, 09 Aug 2008 22:16:23 +0800 |
parents | 56f592f56ff7 |
children | 01ed2bc37eed |
line wrap: on
line diff
--- a/src/paint.c Sat Aug 09 21:34:07 2008 +0800 +++ b/src/paint.c Sat Aug 09 22:16:23 2008 +0800 @@ -53,6 +53,17 @@ color->a = a; } +void paint_color_get(paint_t *paint, + co_comp_t *r, co_comp_t *g, + co_comp_t *b, co_comp_t *a) { + paint_color_t *color = (paint_color_t *)paint; + + *r = color->r; + *g = color->g; + *b = color->b; + *a = color->a; +} + /*! \brief Linear gradient. */ typedef struct _paint_linear {