# HG changeset patch # User Thinker K.F. Li # Date 1291339153 -28800 # Node ID e9d8194fcff052694c084277562d54c498eca644 # Parent 555d89e704c01a87bb8ae7d67a9fcdd53139fb54 Implement mbe_curve_to() for OpenVG diff -r 555d89e704c0 -r e9d8194fcff0 include/mb_graph_engine_openvg.h --- a/include/mb_graph_engine_openvg.h Fri Dec 03 08:49:00 2010 +0800 +++ b/include/mb_graph_engine_openvg.h Fri Dec 03 09:19:13 2010 +0800 @@ -56,7 +56,12 @@ #define mbe_in_stroke(canvas, x, y) (0) #define mbe_new_path(canvas) \ vgClearPath((canvas)->path, VG_PATH_CAPABILITY_ALL) -#define mbe_curve_to(canvas, x1, y1, x2, y2, x3, y3) +#define mbe_curve_to(canvas, x1, y1, x2, y2, x3, y3) \ + do { \ + VGfloat _vg_data[6] = {x1, y1, x2, y2, x3, y3}; \ + char _vg_cmd = VG_CUBIC_TO_ABS; \ + vgAppendPathData((canvas)->path, 1, &_vg_cmd, _vg_data); \ + } while(0) #define mbe_move_to(canvas, x, y) \ do { \ VGfloat _vg_data[2] = {x, y}; \