Mercurial > MadButterfly
annotate src/paint.h @ 21:83d24300a992
opacity (alpha) channel
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sat, 02 Aug 2008 16:06:53 +0800 |
parents | cf6d65398619 |
children | 56f592f56ff7 |
rev | line source |
---|---|
18
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
1 #ifndef __PAINT_H_ |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
2 #define __PAINT_H_ |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
3 |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
4 #include <cairo.h> |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
5 #include "mb_types.h" |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
6 #include "redraw_man.h" |
19 | 7 #include "tools.h" |
18
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
8 |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
9 typedef float co_comp_t; |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
10 |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
11 extern paint_t *paint_color_new(redraw_man_t *rdman, |
21 | 12 co_comp_t r, co_comp_t g, |
13 co_comp_t b, co_comp_t a); | |
18
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
14 extern void paint_color_set(paint_t *paint, |
21 | 15 co_comp_t r, co_comp_t g, |
16 co_comp_t b, co_comp_t a); | |
19 | 17 #define paint_init(_paint, _prepare, _free) \ |
18 do { \ | |
19 (_paint)->prepare = _prepare; \ | |
20 (_paint)->free = _free; \ | |
21 STAILQ_INIT((_paint)->members); \ | |
22 } while(0) \ | |
18
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
23 |
0f3baa488a62
Support solid color paint for fill.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
24 #endif /* __PAINT_H_ */ |