Mercurial > MadButterfly
comparison src/paint.h @ 23:56f592f56ff7
Fix bug and add linear gradient paint.
- fix the bug that forget to clear n_dirty_geos in rdman_redraw_all().
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sat, 02 Aug 2008 23:10:42 +0800 |
parents | 83d24300a992 |
children | 59a295651480 |
comparison
equal
deleted
inserted
replaced
22:8fcf2d878ecd | 23:56f592f56ff7 |
---|---|
19 (_paint)->prepare = _prepare; \ | 19 (_paint)->prepare = _prepare; \ |
20 (_paint)->free = _free; \ | 20 (_paint)->free = _free; \ |
21 STAILQ_INIT((_paint)->members); \ | 21 STAILQ_INIT((_paint)->members); \ |
22 } while(0) \ | 22 } while(0) \ |
23 | 23 |
24 | |
25 typedef struct _grad_stop { | |
26 co_aix offset; | |
27 co_comp_t r, g, b, a; | |
28 } grad_stop_t; | |
29 | |
30 extern paint_t *paint_linear_new(redraw_man_t *rdman, | |
31 co_aix x1, co_aix y1, co_aix x2, co_aix y2); | |
32 extern grad_stop_t *paint_linear_stops(paint_t *paint, | |
33 int n_stops, | |
34 grad_stop_t *stops); | |
35 #define grad_stop_init(stop, _offset, _r, _g, _b, _a) \ | |
36 do { \ | |
37 (stop)->offset = _offset; \ | |
38 (stop)->r = _r; \ | |
39 (stop)->g = _g; \ | |
40 (stop)->b = _b; \ | |
41 (stop)->a = _a; \ | |
42 } while(0) | |
43 | |
44 | |
24 #endif /* __PAINT_H_ */ | 45 #endif /* __PAINT_H_ */ |