# HG changeset patch # User Thinker K.F. Li # Date 1277909843 -28800 # Node ID ac942664fe86c6abaaa1cb91bc60577b3246b784 # Parent de9d210e9c388c9fce72e8b761a8824125d93e11 stroke and fill for VG diff -r de9d210e9c38 -r ac942664fe86 include/mb_graph_engine_openvg.h --- a/include/mb_graph_engine_openvg.h Wed Jun 30 19:53:10 2010 +0800 +++ b/include/mb_graph_engine_openvg.h Wed Jun 30 22:57:23 2010 +0800 @@ -62,11 +62,9 @@ #define mbe_move_to(canvas, x, y) #define mbe_line_to(canvas, x, y) #define mbe_in_fill(canvas, x, y) (0) -#define mbe_stroke(canvas) #define mbe_clear(canvas) #define mbe_paint(canvas) #define mbe_save(canvas) -#define mbe_fill(canvas) #define mbe_arc(canvas, x, y, radius, angle_start, angle_stop) typedef struct _mbe_text_extents_t mbe_text_extents_t; @@ -172,6 +170,21 @@ extern mbe_t *mbe_create(mbe_surface_t *surface); extern void mbe_destroy(mbe_t *canvas); +static void +mbe_stroke(mbe_t *canvas) { + _MK_CURRENT_CTX(canvas); + + vgDrawPath(canvas->path, VG_STROKE_PATH); + vgClearPath(canvas->path, VG_PATH_CAPABILITY_ALL); +} + +static void +mbe_fill(mbe_t *canvas) { + _MK_CURRENT_CTX(canvas); + + vgDrawPath(canvas->path, VG_FILL_PATH); + vgClearPath(canvas->path, VG_PATH_CAPABILITY_ALL); +} /* @} */ diff -r de9d210e9c38 -r ac942664fe86 src/graph_engine_openvg.c --- a/src/graph_engine_openvg.c Wed Jun 30 19:53:10 2010 +0800 +++ b/src/graph_engine_openvg.c Wed Jun 30 22:57:23 2010 +0800 @@ -284,3 +284,4 @@ canvas->tgt->asso_mbe = NULL; /* remove association */ free(canvas); } +