diff src/shape_path.c @ 22:8fcf2d878ecd

shapes with stroke
author Thinker K.F. Li <thinker@branda.to>
date Sat, 02 Aug 2008 16:20:15 +0800
parents 74d3d5dc9aaa
children d50f33040de6
line wrap: on
line diff
--- a/src/shape_path.c	Sat Aug 02 16:06:53 2008 +0800
+++ b/src/shape_path.c	Sat Aug 02 16:20:15 2008 +0800
@@ -417,7 +417,7 @@
     }
 }
 
-void sh_path_fill(shape_t *shape, cairo_t *cr) {
+static void sh_path_path(shape_t *shape, cairo_t *cr) {
     sh_path_t *path;
     int cmd_len;
     char *cmds, cmd;
@@ -536,10 +536,18 @@
 	    break;
 	}
     }
+}
 
+void sh_path_fill(shape_t *shape, cairo_t *cr) {
+    sh_path_path(shape, cr);
     cairo_fill(cr);
 }
 
+void sh_path_stroke(shape_t *shape, cairo_t *cr) {
+    sh_path_path(shape, cr);
+    cairo_stroke(cr);
+}
+
 #ifdef UNITTEST
 
 #include <CUnit/Basic.h>