Mercurial > MadButterfly
comparison src/X_main.c @ 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 |
comparison
equal
deleted
inserted
replaced
55:01ed2bc37eed | 56:e444a8c01735 |
---|---|
155 text_stroke = paint_color_new(&rdman, 0.5, 0.5, 0.5, 1); | 155 text_stroke = paint_color_new(&rdman, 0.5, 0.5, 0.5, 1); |
156 | 156 |
157 face = cairo_get_font_face(tmpcr); | 157 face = cairo_get_font_face(tmpcr); |
158 text = sh_text_new("hello \xe6\xbc\xa2\xe5\xad\x97", 10, h / 4, | 158 text = sh_text_new("hello \xe6\xbc\xa2\xe5\xad\x97", 10, h / 4, |
159 36.0, face); | 159 36.0, face); |
160 text_fill = paint_radial_new(&rdman, 100, h / 4, 70); | |
160 grad_stop_init(text_stops, 0, 0.2, 0.9, 0.2, 1); | 161 grad_stop_init(text_stops, 0, 0.2, 0.9, 0.2, 1); |
161 grad_stop_init(text_stops + 1, 1, 0.9, 0.2, 0.2, 0.1); | 162 grad_stop_init(text_stops + 1, 1, 0.9, 0.2, 0.2, 0.1); |
162 text_fill = paint_radial_new(&rdman, 100, h / 4, 70, 2, text_stops); | 163 paint_radial_stops(text_fill, 2, text_stops); |
163 rdman_paint_stroke(&rdman, text_stroke, text); | 164 rdman_paint_stroke(&rdman, text_stroke, text); |
164 text->stroke_width = 0.5; | 165 text->stroke_width = 0.5; |
165 rdman_paint_fill(&rdman, text_fill, text); | 166 rdman_paint_fill(&rdman, text_fill, text); |
166 rdman_add_shape(&rdman, text, coord3); | 167 rdman_add_shape(&rdman, text, coord3); |
167 | 168 |