Mercurial > MadButterfly
changeset 56:e444a8c01735
Change interface of paint_radial_new()
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Sun, 10 Aug 2008 18:27:52 +0800 |
parents | 01ed2bc37eed |
children | ab028c9f0930 |
files | src/X_main.c src/paint.c src/paint.h |
diffstat | 3 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/X_main.c Sun Aug 10 16:44:21 2008 +0800 +++ b/src/X_main.c Sun Aug 10 18:27:52 2008 +0800 @@ -157,9 +157,10 @@ face = cairo_get_font_face(tmpcr); text = sh_text_new("hello \xe6\xbc\xa2\xe5\xad\x97", 10, h / 4, 36.0, face); + text_fill = paint_radial_new(&rdman, 100, h / 4, 70); grad_stop_init(text_stops, 0, 0.2, 0.9, 0.2, 1); grad_stop_init(text_stops + 1, 1, 0.9, 0.2, 0.2, 0.1); - text_fill = paint_radial_new(&rdman, 100, h / 4, 70, 2, text_stops); + paint_radial_stops(text_fill, 2, text_stops); rdman_paint_stroke(&rdman, text_stroke, text); text->stroke_width = 0.5; rdman_paint_fill(&rdman, text_fill, text);
--- a/src/paint.c Sun Aug 10 16:44:21 2008 +0800 +++ b/src/paint.c Sun Aug 10 18:27:52 2008 +0800 @@ -197,8 +197,7 @@ } paint_t *paint_radial_new(redraw_man_t *rdman, - co_aix cx, co_aix cy, co_aix r, - int n_stops, grad_stop_t *stops) { + co_aix cx, co_aix cy, co_aix r) { paint_radial_t *radial; radial = O_ALLOC(paint_radial_t); @@ -209,8 +208,8 @@ radial->cx = cx; radial->cy = cy; radial->r = r; - radial->n_stops = n_stops; - radial->stops = stops; + radial->n_stops = 0; + radial->stops = NULL; radial->flags = RDF_DIRTY; radial->ptn = NULL;
--- a/src/paint.h Sun Aug 10 16:44:21 2008 +0800 +++ b/src/paint.h Sun Aug 10 18:27:52 2008 +0800 @@ -36,8 +36,7 @@ int n_stops, grad_stop_t *stops); extern paint_t *paint_radial_new(redraw_man_t *rdman, - co_aix cx, co_aix cy, co_aix r, - int n_stops, grad_stop_t *stops); + co_aix cx, co_aix cy, co_aix r); extern grad_stop_t *paint_radial_stops(paint_t *paint, int n_stops, grad_stop_t *stops);