Mercurial > MadButterfly
changeset 1084:e9d8194fcff0 openvg
Implement mbe_curve_to() for OpenVG
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Fri, 03 Dec 2010 09:19:13 +0800 |
parents | 555d89e704c0 |
children | e229e1be6b82 |
files | include/mb_graph_engine_openvg.h |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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}; \