diff src/X_main.c @ 22:8fcf2d878ecd

shapes with stroke
author Thinker K.F. Li <thinker@branda.to>
date Sat, 02 Aug 2008 16:20:15 +0800
parents 83d24300a992
children 56f592f56ff7
line wrap: on
line diff
--- a/src/X_main.c	Sat Aug 02 16:06:53 2008 +0800
+++ b/src/X_main.c	Sat Aug 02 16:20:15 2008 +0800
@@ -17,6 +17,7 @@
     shape_t *path1, *path2;
     coord_t *coord1, *coord2;
     paint_t *fill1, *fill2;
+    paint_t *stroke;
     int i;
 
     redraw_man_init(&rdman, cr);
@@ -25,8 +26,10 @@
 
     fill1 = paint_color_new(&rdman, 1, 1, 0, 0.5);
     fill2 = paint_color_new(&rdman, 0, 1, 1, 0.5);
+    stroke = paint_color_new(&rdman, 0.4, 0.4, 0.4, 1);
     path1 = 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 ");
     rdman_paint_fill(&rdman, fill1, path1);
+    rdman_paint_stroke(&rdman, stroke, path1);
     coord1->matrix[0] = 0.8;
     coord1->matrix[1] = 0;
     coord1->matrix[2] = 20;
@@ -34,6 +37,7 @@
     coord1->matrix[5] = 20;
     path2 = 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 ");
     rdman_paint_fill(&rdman, fill2, path2);
+    rdman_paint_stroke(&rdman, stroke, path2);
     coord2->matrix[0] = -0.8;
     coord2->matrix[1] = 0;
     coord2->matrix[2] = 180;