comparison src/X_main.c @ 15:c2ce186a5c37

X_main uses rdman_redraw_all()
author Thinker K.F. Li <thinker@branda.to>
date Fri, 01 Aug 2008 01:40:07 +0800
parents ed55009d96d3
children e17e12b112c4
comparison
equal deleted inserted replaced
14:d34232f15863 15:c2ce186a5c37
12 void draw_path(cairo_t *cr, int w, int h) { 12 void draw_path(cairo_t *cr, int w, int h) {
13 redraw_man_t rdman; 13 redraw_man_t rdman;
14 shape_t *path; 14 shape_t *path;
15 coord_t *coord; 15 coord_t *coord;
16 16
17 redraw_man_init(&rdman); 17 redraw_man_init(&rdman, cr);
18 coord = rdman.root_coord; 18 coord = rdman.root_coord;
19 19
20 path = sh_path_new("M 22,89.36218 C -34,-0.63782 39,-9.637817 82,12.36218 C 125,34.36218 142,136.36218 142,136.36218 C 100.66667,125.36218 74.26756,123.42795 22,89.36218 z "); 20 path = sh_path_new("M 22,89.36218 C -34,-0.63782 39,-9.637817 82,12.36218 C 125,34.36218 142,136.36218 142,136.36218 C 100.66667,125.36218 74.26756,123.42795 22,89.36218 z ");
21 coord->aggr_matrix[0] = 0.8; 21 coord->aggr_matrix[0] = 0.8;
22 coord->aggr_matrix[1] = 0; 22 coord->aggr_matrix[1] = 0;
23 coord->aggr_matrix[2] = 20; 23 coord->aggr_matrix[2] = 20;
24 coord->aggr_matrix[4] = 0.8; 24 coord->aggr_matrix[4] = 0.8;
25 coord->aggr_matrix[5] = 20; 25 coord->aggr_matrix[5] = 20;
26 rdman_coord_changed(&rdman, coord);
26 rdman_add_shape(&rdman, (shape_t *)path, coord); 27 rdman_add_shape(&rdman, (shape_t *)path, coord);
27 sh_path_transform(path); 28
28 sh_path_draw(path, cr); 29 rdman_redraw_all(&rdman);
30
31 redraw_man_destroy(&rdman);
29 sh_path_free(path); 32 sh_path_free(path);
30 } 33 }
31 34
32 void drawing(cairo_surface_t *surface, int w, int h) { 35 void drawing(cairo_surface_t *surface, int w, int h) {
33 cairo_t *cr; 36 cairo_t *cr;