Mercurial > MadButterfly
changeset 580:7bfeccdc91cb openvg
Encapsulate information of OpenVG objects in structures.
The idea is to encapsulate information of OpenVG in structures to
adapt OpenVG to Graphic Engine API defined by MadButterfly.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Thu, 17 Jun 2010 10:41:53 +0800 |
parents | e2c9117b1e12 |
children | 953acea89f76 |
files | include/mb_graph_engine_openvg.h |
diffstat | 1 files changed, 23 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/include/mb_graph_engine_openvg.h Wed Jun 16 21:28:57 2010 +0800 +++ b/include/mb_graph_engine_openvg.h Thu Jun 17 10:41:53 2010 +0800 @@ -75,6 +75,13 @@ #define mbe_clip(canvas) #define mbe_arc(canvas, x, y, radius, angle_start, angle_stop) +typedef struct _mbe_text_extents_t mbe_text_extents_t; +typedef int mbe_scaled_font_t; +typedef int mbe_font_face_t; +typedef struct _ge_openvg_surface mbe_surface_t; +typedef struct _ge_openvg_pattern mbe_pattern_t; +typedef struct _ge_openvg_mbe mbe_t; + struct _mbe_text_extents_t { co_aix x_bearing; co_aix y_bearing; @@ -83,12 +90,22 @@ co_aix x_advance; co_aix y_advance; }; -typedef struct _mbe_text_extents_t mbe_text_extents_t; -typedef int mbe_scaled_font_t; -typedef int mbe_font_face_t; -typedef int mbe_surface_t; -typedef int mbe_pattern_t; -typedef int mbe_t; + +struct _ge_openvg_mbe { + mbe_pattern_t *src; + mbe_surface_t *tgt; + void *ctx; +}; + +struct _ge_openvg_surface { + void *surface; + mbe_t *asso_mbe; +}; + +struct _ge_openvg_pattern { + void *pattern; + void *asso_img; +}; #define MB_MATRIX_2_OPENVG(vgmtx, mtx) do { \ (vgmtx)[0] = (mtx)[0]; \