comparison src/X_main.c @ 26:d50f33040de6

Set line width for path. - consider width of line when compute bounding box area.
author Thinker K.F. Li <thinker@branda.to>
date Sun, 03 Aug 2008 13:04:55 +0800
parents e598bc809c0f
children 19c603dd6ff9
comparison
equal deleted inserted replaced
25:29937c26bb01 26:d50f33040de6
68 68
69 XFlush(display); 69 XFlush(display);
70 70
71 for(i = 0; i < 50; i++) { 71 for(i = 0; i < 50; i++) {
72 usleep(20000); 72 usleep(20000);
73 path1->stroke_width = i / 10;
74 path2->stroke_width = i / 10;
73 coord1->matrix[2] += 1; 75 coord1->matrix[2] += 1;
74 coord1->matrix[5] += 1; 76 coord1->matrix[5] += 1;
75 coord2->matrix[2] -= 1; 77 coord2->matrix[2] -= 1;
76 coord2->matrix[5] += 1; 78 coord2->matrix[5] += 1;
77 paint_color_set(fill1, 1, 1, (i/25) & 0x1, 0.5); 79 paint_color_set(fill1, 1, 1, (i/25) & 0x1, 0.5);
88 usleep(500000); 90 usleep(500000);
89 paint_color_set(fill1, 1, i % 2, 0, 0.5); 91 paint_color_set(fill1, 1, i % 2, 0, 0.5);
90 paint_color_set(fill2, 0, i % 2, 1, 0.5); 92 paint_color_set(fill2, 0, i % 2, 1, 0.5);
91 rdman_paint_changed(&rdman, fill1); 93 rdman_paint_changed(&rdman, fill1);
92 rdman_paint_changed(&rdman, fill2); 94 rdman_paint_changed(&rdman, fill2);
95 rdman_redraw_changed(&rdman);
96 XFlush(display);
97 }
98
99 for(i = 0; i < 4; i++) {
100 usleep(500000);
101 path1->stroke_width -= 1;
102 path2->stroke_width -= 1;
103 rdman_shape_changed(&rdman, path1);
104 rdman_shape_changed(&rdman, path2);
105 rdman_redraw_changed(&rdman);
106 XFlush(display);
107 }
108 for(i = 0; i < 4; i++) {
109 usleep(500000);
110 path1->stroke_width += 1;
111 path2->stroke_width += 1;
112 rdman_shape_changed(&rdman, path1);
113 rdman_shape_changed(&rdman, path2);
93 rdman_redraw_changed(&rdman); 114 rdman_redraw_changed(&rdman);
94 XFlush(display); 115 XFlush(display);
95 } 116 }
96 117
97 fill1->free(fill1); 118 fill1->free(fill1);