Mercurial > MadButterfly
comparison include/mb_graph_engine_openvg.h @ 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 | af74a96e6624 |
children | bced6fe39856 |
comparison
equal
deleted
inserted
replaced
1083:555d89e704c0 | 1084:e9d8194fcff0 |
---|---|
54 #define mbe_text_path(canvas, utf8) | 54 #define mbe_text_path(canvas, utf8) |
55 #define mbe_rectangle(canvas, x, y, w, h) | 55 #define mbe_rectangle(canvas, x, y, w, h) |
56 #define mbe_in_stroke(canvas, x, y) (0) | 56 #define mbe_in_stroke(canvas, x, y) (0) |
57 #define mbe_new_path(canvas) \ | 57 #define mbe_new_path(canvas) \ |
58 vgClearPath((canvas)->path, VG_PATH_CAPABILITY_ALL) | 58 vgClearPath((canvas)->path, VG_PATH_CAPABILITY_ALL) |
59 #define mbe_curve_to(canvas, x1, y1, x2, y2, x3, y3) | 59 #define mbe_curve_to(canvas, x1, y1, x2, y2, x3, y3) \ |
60 do { \ | |
61 VGfloat _vg_data[6] = {x1, y1, x2, y2, x3, y3}; \ | |
62 char _vg_cmd = VG_CUBIC_TO_ABS; \ | |
63 vgAppendPathData((canvas)->path, 1, &_vg_cmd, _vg_data); \ | |
64 } while(0) | |
60 #define mbe_move_to(canvas, x, y) \ | 65 #define mbe_move_to(canvas, x, y) \ |
61 do { \ | 66 do { \ |
62 VGfloat _vg_data[2] = {x, y}; \ | 67 VGfloat _vg_data[2] = {x, y}; \ |
63 char _vg_cmd = VG_MOVE_TO_ABS; \ | 68 char _vg_cmd = VG_MOVE_TO_ABS; \ |
64 vgAppendPathData((canvas)->path, 1, &_vg_cmd, _vg_data); \ | 69 vgAppendPathData((canvas)->path, 1, &_vg_cmd, _vg_data); \ |