Mercurial > MadButterfly
annotate include/mb_graph_engine_openvg.h @ 1232:6d4de488389e
Change setCurrentScene
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Mon, 10 Jan 2011 11:45:12 +0800 |
parents | 7451af5d63ec |
children |
rev | line source |
---|---|
578
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
1 #ifndef __MB_GE_OPENVG_H_ |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
2 #define __MB_GE_OPENVG_H_ |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
3 |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
4 #include <stdio.h> |
582
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
5 #include <stdlib.h> |
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
6 #include <EGL/egl.h> |
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
7 #include <VG/openvg.h> |
578
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
8 #include "mb_basic_types.h" |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
9 #include "mb_img_ldr.h" |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
10 |
611
38383f5f645d
Change group of OpenVG and Dummy implementation of graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
610
diff
changeset
|
11 /*! \defgroup mb_ge_openvg MadButterfly Graphic Engine with OpenVG |
578
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
12 * @{ |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
13 */ |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
14 #define mbe_scaled_font_text_extents(scaled, utf8, extents) |
1109
77596f3d8d0c
Minor changes on OpenVG graphic engine
Thinker K.F. Li <thinker@codemud.net>
parents:
1095
diff
changeset
|
15 #define mbe_image_surface_get_stride(surface) ((surface)->w * 4) |
77596f3d8d0c
Minor changes on OpenVG graphic engine
Thinker K.F. Li <thinker@codemud.net>
parents:
1095
diff
changeset
|
16 #define mbe_image_surface_get_format(surface) ((surface)->fmt) |
607
51dc49fd34a8
Create pattern from an image
Thinker K.F. Li <thinker@branda.to>
parents:
606
diff
changeset
|
17 #define mbe_image_surface_get_height(surface) (surface)->h |
51dc49fd34a8
Create pattern from an image
Thinker K.F. Li <thinker@branda.to>
parents:
606
diff
changeset
|
18 #define mbe_image_surface_get_width(surface) (surface)->w |
578
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
19 #define mbe_image_surface_get_data(surface) ((unsigned char *)NULL) |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
20 #define mbe_scaled_font_reference(scaled) ((mbe_scaled_font_t *)NULL) |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
21 #define mbe_scaled_font_destroy(scaled) |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
22 #define mbe_font_face_reference(face) ((mbe_font_face_t *)NULL) |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
23 #define mbe_scaled_font_create(face, fnt_mtx, ctm) ((mbe_scaled_font_t *)NULL) |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
24 #define mbe_font_face_destroy(face) |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
25 #define mbe_set_scaled_font(canvas, scaled) |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
26 #define mbe_get_scaled_font(canvas) ((mbe_scaled_font_t *)NULL) |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
27 #define mbe_query_font_face(family, slant, weight) ((mbe_font_face_t *)NULL) |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
28 #define mbe_free_font_face(face) |
617
89fee368e367
Set (stroke) line width for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
616
diff
changeset
|
29 #define mbe_set_line_width(canvas, w) \ |
89fee368e367
Set (stroke) line width for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
616
diff
changeset
|
30 do { \ |
89fee368e367
Set (stroke) line width for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
616
diff
changeset
|
31 _MK_CURRENT_CTX(canvas); \ |
89fee368e367
Set (stroke) line width for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
616
diff
changeset
|
32 vgSetf(VG_STROKE_LINE_WIDTH, w); \ |
89fee368e367
Set (stroke) line width for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
616
diff
changeset
|
33 } while(0) |
600
20b396c09c23
Integrate pattern source with paint model of canvas
Thinker K.F. Li <thinker@branda.to>
parents:
599
diff
changeset
|
34 #define mbe_set_source_rgb(canvas, r, g, b) \ |
20b396c09c23
Integrate pattern source with paint model of canvas
Thinker K.F. Li <thinker@branda.to>
parents:
599
diff
changeset
|
35 mbe_set_source_rgba(canvas, r, g, b, 1) |
578
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
36 #define mbe_get_font_face(canvas) ((mbe_font_face_t *)NULL) |
582
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
37 #define mbe_set_source(canvas, pattern) \ |
600
20b396c09c23
Integrate pattern source with paint model of canvas
Thinker K.F. Li <thinker@branda.to>
parents:
599
diff
changeset
|
38 do { \ |
20b396c09c23
Integrate pattern source with paint model of canvas
Thinker K.F. Li <thinker@branda.to>
parents:
599
diff
changeset
|
39 (canvas)->src = (pattern); \ |
20b396c09c23
Integrate pattern source with paint model of canvas
Thinker K.F. Li <thinker@branda.to>
parents:
599
diff
changeset
|
40 (canvas)->paint = (pattern)->paint; \ |
20b396c09c23
Integrate pattern source with paint model of canvas
Thinker K.F. Li <thinker@branda.to>
parents:
599
diff
changeset
|
41 (canvas)->paint_installed = 0; \ |
20b396c09c23
Integrate pattern source with paint model of canvas
Thinker K.F. Li <thinker@branda.to>
parents:
599
diff
changeset
|
42 } while(0) |
616
7d70a811829b
mbe_fill_preserve() and mbe_reset_scissoring() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
615
diff
changeset
|
43 #define mbe_reset_scissoring(canvas) \ |
7d70a811829b
mbe_fill_preserve() and mbe_reset_scissoring() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
615
diff
changeset
|
44 do { \ |
7d70a811829b
mbe_fill_preserve() and mbe_reset_scissoring() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
615
diff
changeset
|
45 _MK_CURRENT_CTX(canvas); \ |
7d70a811829b
mbe_fill_preserve() and mbe_reset_scissoring() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
615
diff
changeset
|
46 vgSeti(VG_SCISSORING, VG_FALSE); \ |
7d70a811829b
mbe_fill_preserve() and mbe_reset_scissoring() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
615
diff
changeset
|
47 } while(0) |
582
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
48 #define mbe_get_target(canvas) ((mbe_surface_t *)(canvas)->tgt) |
621
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
49 #define mbe_close_path(canvas) \ |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
50 do { \ |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
51 char _vg_cmd = VG_CLOSE_PATH; \ |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
52 vgAppendPathData((canvas)->path, 1, &_vg_cmd, NULL); \ |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
53 } while(0) |
578
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
54 #define mbe_text_path(canvas, utf8) |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
55 #define mbe_rectangle(canvas, x, y, w, h) |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
56 #define mbe_in_stroke(canvas, x, y) (0) |
615
0f0abc48e10a
mbe_new_path() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
614
diff
changeset
|
57 #define mbe_new_path(canvas) \ |
0f0abc48e10a
mbe_new_path() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
614
diff
changeset
|
58 vgClearPath((canvas)->path, VG_PATH_CAPABILITY_ALL) |
1084
e9d8194fcff0
Implement mbe_curve_to() for OpenVG
Thinker K.F. Li <thinker@codemud.net>
parents:
1082
diff
changeset
|
59 #define mbe_curve_to(canvas, x1, y1, x2, y2, x3, y3) \ |
e9d8194fcff0
Implement mbe_curve_to() for OpenVG
Thinker K.F. Li <thinker@codemud.net>
parents:
1082
diff
changeset
|
60 do { \ |
e9d8194fcff0
Implement mbe_curve_to() for OpenVG
Thinker K.F. Li <thinker@codemud.net>
parents:
1082
diff
changeset
|
61 VGfloat _vg_data[6] = {x1, y1, x2, y2, x3, y3}; \ |
e9d8194fcff0
Implement mbe_curve_to() for OpenVG
Thinker K.F. Li <thinker@codemud.net>
parents:
1082
diff
changeset
|
62 char _vg_cmd = VG_CUBIC_TO_ABS; \ |
e9d8194fcff0
Implement mbe_curve_to() for OpenVG
Thinker K.F. Li <thinker@codemud.net>
parents:
1082
diff
changeset
|
63 vgAppendPathData((canvas)->path, 1, &_vg_cmd, _vg_data); \ |
e9d8194fcff0
Implement mbe_curve_to() for OpenVG
Thinker K.F. Li <thinker@codemud.net>
parents:
1082
diff
changeset
|
64 } while(0) |
621
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
65 #define mbe_move_to(canvas, x, y) \ |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
66 do { \ |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
67 VGfloat _vg_data[2] = {x, y}; \ |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
68 char _vg_cmd = VG_MOVE_TO_ABS; \ |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
69 vgAppendPathData((canvas)->path, 1, &_vg_cmd, _vg_data); \ |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
70 } while(0) |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
71 #define mbe_line_to(canvas, x, y) \ |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
72 do { \ |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
73 VGfloat _vg_data[2] = {x, y}; \ |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
74 char _vg_cmd = VG_LINE_TO_ABS; \ |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
75 vgAppendPathData((canvas)->path, 1, &_vg_cmd, _vg_data); \ |
d8cdd57ceff5
Various path functions for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
620
diff
changeset
|
76 } while(0) |
1095
bced6fe39856
Fix position (collision) detection for OpenVG.
Thinker K.F. Li <thinker@codemud.net>
parents:
1084
diff
changeset
|
77 #define mbe_in_fill(canvas, x, y) (1) |
620
3f544e876939
The way to mbe_save and mbe_restore
Thinker K.F. Li <thinker@branda.to>
parents:
619
diff
changeset
|
78 /* TODO: change prototype of mbe_arc() to remove mbe_save() and |
3f544e876939
The way to mbe_save and mbe_restore
Thinker K.F. Li <thinker@branda.to>
parents:
619
diff
changeset
|
79 * mbe_restore(). |
3f544e876939
The way to mbe_save and mbe_restore
Thinker K.F. Li <thinker@branda.to>
parents:
619
diff
changeset
|
80 */ |
578
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
81 #define mbe_save(canvas) |
620
3f544e876939
The way to mbe_save and mbe_restore
Thinker K.F. Li <thinker@branda.to>
parents:
619
diff
changeset
|
82 #define mbe_restore(canvas) |
578
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
83 #define mbe_arc(canvas, x, y, radius, angle_start, angle_stop) |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
84 |
580
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
85 typedef struct _mbe_text_extents_t mbe_text_extents_t; |
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
86 typedef int mbe_scaled_font_t; |
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
87 typedef int mbe_font_face_t; |
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
88 typedef struct _ge_openvg_surface mbe_surface_t; |
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
89 typedef struct _ge_openvg_pattern mbe_pattern_t; |
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
90 typedef struct _ge_openvg_mbe mbe_t; |
603
39d27911c3ae
Remove mbe_image_surface_create_for_data()
Thinker K.F. Li <thinker@branda.to>
parents:
602
diff
changeset
|
91 typedef struct _ge_openvg_img _ge_openvg_img_t; |
580
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
92 |
578
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
93 struct _mbe_text_extents_t { |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
94 co_aix x_bearing; |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
95 co_aix y_bearing; |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
96 co_aix width; |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
97 co_aix height; |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
98 co_aix x_advance; |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
99 co_aix y_advance; |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
100 }; |
580
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
101 |
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
102 struct _ge_openvg_mbe { |
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
103 mbe_pattern_t *src; |
595 | 104 VGPaint paint; /*!< \brief The paint associated with |
105 * the src pattern */ | |
106 int paint_installed; | |
580
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
107 mbe_surface_t *tgt; |
582
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
108 EGLContext ctx; |
590
b714f0c9992e
include a VGPath in VG canvas
Thinker K.F. Li <thinker@branda.to>
parents:
589
diff
changeset
|
109 VGPath path; |
612
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
110 |
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
111 VGfloat mtx[9]; |
580
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
112 }; |
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
113 |
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
114 struct _ge_openvg_surface { |
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
115 void *surface; |
590
b714f0c9992e
include a VGPath in VG canvas
Thinker K.F. Li <thinker@branda.to>
parents:
589
diff
changeset
|
116 mbe_t *asso_mbe; /* There is a association between |
b714f0c9992e
include a VGPath in VG canvas
Thinker K.F. Li <thinker@branda.to>
parents:
589
diff
changeset
|
117 * surface and mbe */ |
603
39d27911c3ae
Remove mbe_image_surface_create_for_data()
Thinker K.F. Li <thinker@branda.to>
parents:
602
diff
changeset
|
118 _ge_openvg_img_t *asso_img; |
592
de9d210e9c38
Specify width and height while create an image surface
Thinker K.F. Li <thinker@branda.to>
parents:
590
diff
changeset
|
119 int w, h; |
1080
394d7d4c0673
Fix issue that tank does not update window with OpenVG.
Thinker K.F. Li <thinker@codemud.net>
parents:
1077
diff
changeset
|
120 mb_img_fmt_t fmt; |
580
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
121 }; |
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
122 |
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
123 struct _ge_openvg_pattern { |
603
39d27911c3ae
Remove mbe_image_surface_create_for_data()
Thinker K.F. Li <thinker@branda.to>
parents:
602
diff
changeset
|
124 _ge_openvg_img_t *asso_img; |
612
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
125 VGfloat mtx[9]; |
595 | 126 VGPaint paint; |
580
7bfeccdc91cb
Encapsulate information of OpenVG objects in structures.
Thinker K.F. Li <thinker@branda.to>
parents:
578
diff
changeset
|
127 }; |
578
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
128 |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
129 #define MB_MATRIX_2_OPENVG(vgmtx, mtx) do { \ |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
130 (vgmtx)[0] = (mtx)[0]; \ |
583
ca57132020e4
Set transform matrix for VG contexts
Thinker K.F. Li <thinker@branda.to>
parents:
582
diff
changeset
|
131 (vgmtx)[1] = (mtx)[1]; \ |
ca57132020e4
Set transform matrix for VG contexts
Thinker K.F. Li <thinker@branda.to>
parents:
582
diff
changeset
|
132 (vgmtx)[2] = (mtx)[2]; \ |
ca57132020e4
Set transform matrix for VG contexts
Thinker K.F. Li <thinker@branda.to>
parents:
582
diff
changeset
|
133 (vgmtx)[3] = (mtx)[3]; \ |
578
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
134 (vgmtx)[4] = (mtx)[4]; \ |
583
ca57132020e4
Set transform matrix for VG contexts
Thinker K.F. Li <thinker@branda.to>
parents:
582
diff
changeset
|
135 (vgmtx)[5] = (mtx)[5]; \ |
ca57132020e4
Set transform matrix for VG contexts
Thinker K.F. Li <thinker@branda.to>
parents:
582
diff
changeset
|
136 (vgmtx)[6] = 0; \ |
ca57132020e4
Set transform matrix for VG contexts
Thinker K.F. Li <thinker@branda.to>
parents:
582
diff
changeset
|
137 (vgmtx)[7] = 0; \ |
578
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
138 (vgmtx)[8] = 1; \ |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
139 } while(0) |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
140 |
582
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
141 extern EGLNativeDisplayType _ge_openvg_disp_id; |
584
543a2a8523fb
Make surce current VG context
Thinker K.F. Li <thinker@branda.to>
parents:
583
diff
changeset
|
142 extern mbe_t *_ge_openvg_current_canvas; |
612
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
143 extern void _mbe_load_pattern_mtx(VGfloat *mtx1, VGfloat *mtx2, int mode); |
619
7020ed3c3e37
Actiavte a VGImage before using a pattern paint or image surface.
Thinker K.F. Li <thinker@branda.to>
parents:
618
diff
changeset
|
144 extern void _ge_vg_img_activate_for_pattern(mbe_pattern_t *ptn); |
7020ed3c3e37
Actiavte a VGImage before using a pattern paint or image surface.
Thinker K.F. Li <thinker@branda.to>
parents:
618
diff
changeset
|
145 extern void _ge_vg_img_activate_for_surface(mbe_surface_t *surf); |
582
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
146 |
610
e78bff7d23d3
create pattern from surface for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
608
diff
changeset
|
147 extern mbe_pattern_t *mbe_pattern_create_for_surface(mbe_surface_t *surface); |
606
e21eb54c7d9c
Implement radial gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents:
604
diff
changeset
|
148 extern mbe_pattern_t *mbe_pattern_create_radial(co_aix cx0, co_aix cy0, |
e21eb54c7d9c
Implement radial gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents:
604
diff
changeset
|
149 co_aix radius0, |
e21eb54c7d9c
Implement radial gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents:
604
diff
changeset
|
150 co_aix cx1, co_aix cy1, |
e21eb54c7d9c
Implement radial gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents:
604
diff
changeset
|
151 co_aix radius1, |
e21eb54c7d9c
Implement radial gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents:
604
diff
changeset
|
152 grad_stop_t *stops, |
e21eb54c7d9c
Implement radial gradient paint.
Thinker K.F. Li <thinker@branda.to>
parents:
604
diff
changeset
|
153 int stop_cnt); |
604
38514a7c6b26
Linear gradient for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
603
diff
changeset
|
154 extern mbe_pattern_t *mbe_pattern_create_linear(co_aix x0, co_aix y0, |
38514a7c6b26
Linear gradient for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
603
diff
changeset
|
155 co_aix x1, co_aix y1, |
38514a7c6b26
Linear gradient for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
603
diff
changeset
|
156 grad_stop_t *stops, |
38514a7c6b26
Linear gradient for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
603
diff
changeset
|
157 int stop_cnt); |
607
51dc49fd34a8
Create pattern from an image
Thinker K.F. Li <thinker@branda.to>
parents:
606
diff
changeset
|
158 extern mbe_pattern_t *mbe_pattern_create_image(mb_img_data_t *img); |
618
35a67a837a53
Use reference count to trace life of _ge_openvg_img_t objects
Thinker K.F. Li <thinker@branda.to>
parents:
617
diff
changeset
|
159 extern void mbe_pattern_destroy(mbe_pattern_t *ptn); |
612
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
160 extern void mbe_pattern_set_matrix(mbe_pattern_t *ptn, co_aix *mtx); |
598
aba62eb9362d
define color source for VG
Thinker K.F. Li <thinker@branda.to>
parents:
597
diff
changeset
|
161 extern void mbe_set_source_rgba(mbe_t *canvas, co_comp_t r, co_comp_t g, |
aba62eb9362d
define color source for VG
Thinker K.F. Li <thinker@branda.to>
parents:
597
diff
changeset
|
162 co_comp_t b, co_comp_t a); |
604
38514a7c6b26
Linear gradient for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
603
diff
changeset
|
163 /* TODO: rename n_areas to areas_cnt and make it after areas */ |
588
e9923024f65e
Implement mbe_scissoring() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
586
diff
changeset
|
164 extern void mbe_scissoring(mbe_t *canvas, int n_areas, area_t **areas); |
e9923024f65e
Implement mbe_scissoring() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
586
diff
changeset
|
165 |
e9923024f65e
Implement mbe_scissoring() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
586
diff
changeset
|
166 |
584
543a2a8523fb
Make surce current VG context
Thinker K.F. Li <thinker@branda.to>
parents:
583
diff
changeset
|
167 #define _VG_DISPLAY() eglGetDisplay(_ge_openvg_disp_id) |
543a2a8523fb
Make surce current VG context
Thinker K.F. Li <thinker@branda.to>
parents:
583
diff
changeset
|
168 |
543a2a8523fb
Make surce current VG context
Thinker K.F. Li <thinker@branda.to>
parents:
583
diff
changeset
|
169 /* \brief Make the context of a canvas to be current context. |
604
38514a7c6b26
Linear gradient for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
603
diff
changeset
|
170 * |
38514a7c6b26
Linear gradient for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
603
diff
changeset
|
171 * TODO: swtich VGImage between VGPaint and Surface. |
584
543a2a8523fb
Make surce current VG context
Thinker K.F. Li <thinker@branda.to>
parents:
583
diff
changeset
|
172 */ |
543a2a8523fb
Make surce current VG context
Thinker K.F. Li <thinker@branda.to>
parents:
583
diff
changeset
|
173 #define _MK_CURRENT_CTX(canvas) do { \ |
543a2a8523fb
Make surce current VG context
Thinker K.F. Li <thinker@branda.to>
parents:
583
diff
changeset
|
174 if(_ge_openvg_current_canvas != (canvas)) { \ |
543a2a8523fb
Make surce current VG context
Thinker K.F. Li <thinker@branda.to>
parents:
583
diff
changeset
|
175 _ge_openvg_current_canvas = canvas; \ |
604
38514a7c6b26
Linear gradient for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
603
diff
changeset
|
176 eglMakeCurrent(_VG_DISPLAY(), \ |
38514a7c6b26
Linear gradient for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
603
diff
changeset
|
177 (canvas)->tgt->surface, \ |
38514a7c6b26
Linear gradient for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
603
diff
changeset
|
178 (canvas)->tgt->surface, \ |
38514a7c6b26
Linear gradient for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
603
diff
changeset
|
179 (canvas)->ctx); \ |
584
543a2a8523fb
Make surce current VG context
Thinker K.F. Li <thinker@branda.to>
parents:
583
diff
changeset
|
180 } \ |
619
7020ed3c3e37
Actiavte a VGImage before using a pattern paint or image surface.
Thinker K.F. Li <thinker@branda.to>
parents:
618
diff
changeset
|
181 /* \sa _ge_openvg_img_t */ \ |
7020ed3c3e37
Actiavte a VGImage before using a pattern paint or image surface.
Thinker K.F. Li <thinker@branda.to>
parents:
618
diff
changeset
|
182 _ge_vg_img_activate_for_surface((canvas)->tgt); \ |
584
543a2a8523fb
Make surce current VG context
Thinker K.F. Li <thinker@branda.to>
parents:
583
diff
changeset
|
183 } while(0) |
604
38514a7c6b26
Linear gradient for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
603
diff
changeset
|
184 /* TODO: switch VGImage between VGPaint and surface. */ |
595 | 185 #define _MK_CURRENT_PAINT(canvas) \ |
619
7020ed3c3e37
Actiavte a VGImage before using a pattern paint or image surface.
Thinker K.F. Li <thinker@branda.to>
parents:
618
diff
changeset
|
186 do { \ |
7020ed3c3e37
Actiavte a VGImage before using a pattern paint or image surface.
Thinker K.F. Li <thinker@branda.to>
parents:
618
diff
changeset
|
187 if((canvas)->paint_installed == 0) { \ |
7020ed3c3e37
Actiavte a VGImage before using a pattern paint or image surface.
Thinker K.F. Li <thinker@branda.to>
parents:
618
diff
changeset
|
188 vgSetPaint((canvas)->paint, VG_FILL_PATH|VG_STROKE_PATH); \ |
7020ed3c3e37
Actiavte a VGImage before using a pattern paint or image surface.
Thinker K.F. Li <thinker@branda.to>
parents:
618
diff
changeset
|
189 (canvas)->paint_installed = 1; \ |
7020ed3c3e37
Actiavte a VGImage before using a pattern paint or image surface.
Thinker K.F. Li <thinker@branda.to>
parents:
618
diff
changeset
|
190 } \ |
7020ed3c3e37
Actiavte a VGImage before using a pattern paint or image surface.
Thinker K.F. Li <thinker@branda.to>
parents:
618
diff
changeset
|
191 /* \sa _ge_openvg_img_t */ \ |
7020ed3c3e37
Actiavte a VGImage before using a pattern paint or image surface.
Thinker K.F. Li <thinker@branda.to>
parents:
618
diff
changeset
|
192 if((canvas)->src) \ |
7020ed3c3e37
Actiavte a VGImage before using a pattern paint or image surface.
Thinker K.F. Li <thinker@branda.to>
parents:
618
diff
changeset
|
193 _ge_vg_img_activate_for_pattern((canvas)->src); \ |
7020ed3c3e37
Actiavte a VGImage before using a pattern paint or image surface.
Thinker K.F. Li <thinker@branda.to>
parents:
618
diff
changeset
|
194 } while(0) |
583
ca57132020e4
Set transform matrix for VG contexts
Thinker K.F. Li <thinker@branda.to>
parents:
582
diff
changeset
|
195 |
612
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
196 #define mbe_transform(canvas, _mtx) \ |
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
197 do { \ |
614
9c5705da2495
Fix the bug of foregting make current context before seting transform
Thinker K.F. Li <thinker@branda.to>
parents:
612
diff
changeset
|
198 _MK_CURRENT_CTX(canvas); \ |
612
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
199 MB_MATRIX_2_OPENVG((canvas)->mtx, _mtx); \ |
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
200 _mbe_load_pattern_mtx(_mtx, NULL, \ |
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
201 VG_MATRIX_PATH_USER_TO_SURFACE); \ |
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
202 } while(0) |
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
203 |
583
ca57132020e4
Set transform matrix for VG contexts
Thinker K.F. Li <thinker@branda.to>
parents:
582
diff
changeset
|
204 |
582
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
205 #define EGL_GLX 1 |
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
206 #ifdef EGL_GLX |
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
207 #include <X11/Xlib.h> |
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
208 #include <X11/Xutil.h> |
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
209 |
1110
851a062368bd
Change signature of mbe_win_surface_create() by using format argument
Thinker K.F. Li <thinker@codemud.net>
parents:
1109
diff
changeset
|
210 /* |
851a062368bd
Change signature of mbe_win_surface_create() by using format argument
Thinker K.F. Li <thinker@codemud.net>
parents:
1109
diff
changeset
|
211 * TODO: define a proper type for display and drawable. |
851a062368bd
Change signature of mbe_win_surface_create() by using format argument
Thinker K.F. Li <thinker@codemud.net>
parents:
1109
diff
changeset
|
212 */ |
851a062368bd
Change signature of mbe_win_surface_create() by using format argument
Thinker K.F. Li <thinker@codemud.net>
parents:
1109
diff
changeset
|
213 extern mbe_surface_t *mbe_win_surface_create(void *display, |
851a062368bd
Change signature of mbe_win_surface_create() by using format argument
Thinker K.F. Li <thinker@codemud.net>
parents:
1109
diff
changeset
|
214 void *drawable, |
851a062368bd
Change signature of mbe_win_surface_create() by using format argument
Thinker K.F. Li <thinker@codemud.net>
parents:
1109
diff
changeset
|
215 int fmt, |
1077
e224f496e6b8
Add missed functions for openvg
Thinker K.F. Li <thinker@codemud.net>
parents:
630
diff
changeset
|
216 int width, int height); |
582
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
217 #endif |
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
218 |
589
d733e198bb25
Move functions from mb_graph_engine_openvg.h to the C file
Thinker K.F. Li <thinker@branda.to>
parents:
588
diff
changeset
|
219 extern mbe_surface_t *mbe_image_surface_create(mb_img_fmt_t fmt, |
d733e198bb25
Move functions from mb_graph_engine_openvg.h to the C file
Thinker K.F. Li <thinker@branda.to>
parents:
588
diff
changeset
|
220 int w, int h); |
1077
e224f496e6b8
Add missed functions for openvg
Thinker K.F. Li <thinker@codemud.net>
parents:
630
diff
changeset
|
221 extern mbe_surface_t * |
e224f496e6b8
Add missed functions for openvg
Thinker K.F. Li <thinker@codemud.net>
parents:
630
diff
changeset
|
222 mbe_image_surface_create_for_data(unsigned char *data, |
e224f496e6b8
Add missed functions for openvg
Thinker K.F. Li <thinker@codemud.net>
parents:
630
diff
changeset
|
223 mb_img_fmt_t fmt, |
e224f496e6b8
Add missed functions for openvg
Thinker K.F. Li <thinker@codemud.net>
parents:
630
diff
changeset
|
224 int width, int height, |
e224f496e6b8
Add missed functions for openvg
Thinker K.F. Li <thinker@codemud.net>
parents:
630
diff
changeset
|
225 int stride); |
618
35a67a837a53
Use reference count to trace life of _ge_openvg_img_t objects
Thinker K.F. Li <thinker@branda.to>
parents:
617
diff
changeset
|
226 extern void mbe_surface_destroy(mbe_surface_t *surface); |
582
dd546c4da180
deal with EGL surface, context for OpenVG GE
Thinker K.F. Li <thinker@branda.to>
parents:
580
diff
changeset
|
227 |
622
39bd74da7f92
mbe_copy_source() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
621
diff
changeset
|
228 extern void mbe_copy_source(mbe_t *src_canvas, mbe_t *dst_canvas); |
1114
7451af5d63ec
Make tank and calculator works for console backend
Thinker K.F. Li <thinker@codemud.net>
parents:
1110
diff
changeset
|
229 extern void mbe_flush(mbe_t *canvas); |
589
d733e198bb25
Move functions from mb_graph_engine_openvg.h to the C file
Thinker K.F. Li <thinker@branda.to>
parents:
588
diff
changeset
|
230 extern mbe_t *mbe_create(mbe_surface_t *surface); |
590
b714f0c9992e
include a VGPath in VG canvas
Thinker K.F. Li <thinker@branda.to>
parents:
589
diff
changeset
|
231 extern void mbe_destroy(mbe_t *canvas); |
608
6c74bc371e37
paint with alpha for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
607
diff
changeset
|
232 extern void mbe_paint_with_alpha(mbe_t *canvas, co_comp_t alpha); |
595 | 233 extern void mbe_paint(mbe_t *canvas); |
597
3300992b29ff
Define mbe_clear() for VG
Thinker K.F. Li <thinker@branda.to>
parents:
595
diff
changeset
|
234 extern void mbe_clear(mbe_t *canvas); |
630
bd18951b51d5
Add initial code for graphic engines
Thinker K.F. Li <thinker@branda.to>
parents:
622
diff
changeset
|
235 extern void mbe_init(); |
595 | 236 |
593 | 237 static void |
238 mbe_stroke(mbe_t *canvas) { | |
239 _MK_CURRENT_CTX(canvas); | |
595 | 240 _MK_CURRENT_PAINT(canvas); |
612
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
241 if(canvas->src) |
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
242 _mbe_load_pattern_mtx(canvas->src->mtx, NULL, |
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
243 VG_MATRIX_STROKE_PAINT_TO_USER); |
593 | 244 |
245 vgDrawPath(canvas->path, VG_STROKE_PATH); | |
246 vgClearPath(canvas->path, VG_PATH_CAPABILITY_ALL); | |
247 } | |
248 | |
249 static void | |
616
7d70a811829b
mbe_fill_preserve() and mbe_reset_scissoring() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
615
diff
changeset
|
250 mbe_fill_preserve(mbe_t *canvas) { |
593 | 251 _MK_CURRENT_CTX(canvas); |
595 | 252 _MK_CURRENT_PAINT(canvas); |
612
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
253 if(canvas->src) |
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
254 _mbe_load_pattern_mtx(canvas->src->mtx, NULL, |
b1d1b6c5af90
Implements setting pattern matrix for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
611
diff
changeset
|
255 VG_MATRIX_FILL_PAINT_TO_USER); |
593 | 256 |
257 vgDrawPath(canvas->path, VG_FILL_PATH); | |
616
7d70a811829b
mbe_fill_preserve() and mbe_reset_scissoring() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
615
diff
changeset
|
258 } |
7d70a811829b
mbe_fill_preserve() and mbe_reset_scissoring() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
615
diff
changeset
|
259 |
7d70a811829b
mbe_fill_preserve() and mbe_reset_scissoring() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
615
diff
changeset
|
260 static void |
7d70a811829b
mbe_fill_preserve() and mbe_reset_scissoring() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
615
diff
changeset
|
261 mbe_fill(mbe_t *canvas) { |
7d70a811829b
mbe_fill_preserve() and mbe_reset_scissoring() for OpenVG
Thinker K.F. Li <thinker@branda.to>
parents:
615
diff
changeset
|
262 mbe_fill_preserve(canvas); |
593 | 263 vgClearPath(canvas->path, VG_PATH_CAPABILITY_ALL); |
264 } | |
578
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
265 /* @} */ |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
266 |
fd5f5d9e00d2
A dummy graphic engine for OpenVG.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
267 #endif /* __MB_GE_OPENVG_H_ */ |