Mercurial > MadButterfly
comparison include/mb_graph_engine_openvg.h @ 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 | fd5f5d9e00d2 |
children | dd546c4da180 |
comparison
equal
deleted
inserted
replaced
579:e2c9117b1e12 | 580:7bfeccdc91cb |
---|---|
73 #define mbe_save(canvas) | 73 #define mbe_save(canvas) |
74 #define mbe_fill(canvas) | 74 #define mbe_fill(canvas) |
75 #define mbe_clip(canvas) | 75 #define mbe_clip(canvas) |
76 #define mbe_arc(canvas, x, y, radius, angle_start, angle_stop) | 76 #define mbe_arc(canvas, x, y, radius, angle_start, angle_stop) |
77 | 77 |
78 typedef struct _mbe_text_extents_t mbe_text_extents_t; | |
79 typedef int mbe_scaled_font_t; | |
80 typedef int mbe_font_face_t; | |
81 typedef struct _ge_openvg_surface mbe_surface_t; | |
82 typedef struct _ge_openvg_pattern mbe_pattern_t; | |
83 typedef struct _ge_openvg_mbe mbe_t; | |
84 | |
78 struct _mbe_text_extents_t { | 85 struct _mbe_text_extents_t { |
79 co_aix x_bearing; | 86 co_aix x_bearing; |
80 co_aix y_bearing; | 87 co_aix y_bearing; |
81 co_aix width; | 88 co_aix width; |
82 co_aix height; | 89 co_aix height; |
83 co_aix x_advance; | 90 co_aix x_advance; |
84 co_aix y_advance; | 91 co_aix y_advance; |
85 }; | 92 }; |
86 typedef struct _mbe_text_extents_t mbe_text_extents_t; | 93 |
87 typedef int mbe_scaled_font_t; | 94 struct _ge_openvg_mbe { |
88 typedef int mbe_font_face_t; | 95 mbe_pattern_t *src; |
89 typedef int mbe_surface_t; | 96 mbe_surface_t *tgt; |
90 typedef int mbe_pattern_t; | 97 void *ctx; |
91 typedef int mbe_t; | 98 }; |
99 | |
100 struct _ge_openvg_surface { | |
101 void *surface; | |
102 mbe_t *asso_mbe; | |
103 }; | |
104 | |
105 struct _ge_openvg_pattern { | |
106 void *pattern; | |
107 void *asso_img; | |
108 }; | |
92 | 109 |
93 #define MB_MATRIX_2_OPENVG(vgmtx, mtx) do { \ | 110 #define MB_MATRIX_2_OPENVG(vgmtx, mtx) do { \ |
94 (vgmtx)[0] = (mtx)[0]; \ | 111 (vgmtx)[0] = (mtx)[0]; \ |
95 (vgmtx)[1] = (mtx)[3]; \ | 112 (vgmtx)[1] = (mtx)[3]; \ |
96 (vgmtx)[2] = 0; \ | 113 (vgmtx)[2] = 0; \ |