Mercurial > MadButterfly
annotate src/graph_engine_skia.cpp @ 472:4254eaa699d0 Android_Skia
Declare functions that should be implemented by Skia graphic engine
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Thu, 12 Nov 2009 21:32:52 +0800 |
parents | 4dc0be6c044a |
children | ba64f928542b |
rev | line source |
---|---|
472
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
1 #include <stdio.h> |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
2 #include <SkCanva.h> |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
3 #include <SkBitmap.h> |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
4 #include <SkShader.h> |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
5 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
6 #define C_START extern "C" { |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
7 #define C_END } |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
8 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
9 C_START |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
10 |
468
ae784a86ba82
C++ instead of C to bridge to Skia
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
11 #include "mb_graph_engine_skia.h" |
ae784a86ba82
C++ instead of C to bridge to Skia
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
12 #include "mb_shapes.h" |
472
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
13 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
14 struct _mbe_scaled_font_t { |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
15 struct _mb_font_face_t *face; |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
16 mbe_matrix_t fnt_mtx; |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
17 mbe_matrix_t ctm; |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
18 } |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
19 struct _mbe_font_face_t {}; |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
20 struct _mbe_t { |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
21 SkCanvas *canvas; |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
22 SkShader *shader; |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
23 int shader_owned; |
469
4dc0be6c044a
Add copy and clear graphic engine functions.
Thinker K.F. Li <thinker@branda.to>
parents:
468
diff
changeset
|
24 }; |
468
ae784a86ba82
C++ instead of C to bridge to Skia
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
25 |
ae784a86ba82
C++ instead of C to bridge to Skia
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
26 #ifndef ASSERT |
ae784a86ba82
C++ instead of C to bridge to Skia
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
27 #define ASSERT(x) |
ae784a86ba82
C++ instead of C to bridge to Skia
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
28 #endif |
472
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
29 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
30 void mbe_pattern_add_color_stop_rgba(mbe_pattern_t *ptn, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
31 co_aix offset, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
32 co_aix r, co_aix g, co_aix b, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
33 co_aix a) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
34 mbe_pattern_t *mbe_pattern_create_for_surface(mbe_surface_t *surface) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
35 mbe_pattern_t *mbe_pattern_create_radial(co_aix cx0, co_aix cy0, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
36 co_aix radius0, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
37 co_aix cx1, co_aix cy1, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
38 co_aix radius1) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
39 mbe_pattern_t *mbe_pattern_create_linear(co_aix x0, co_aix y0, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
40 co_aix x1, co_aix y1) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
41 void mbe_pattern_set_matrix(mbe_pattern_t *ptn, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
42 const mbe_matrix_t *matrix) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
43 void mbe_pattern_destroy(mbe_pattern_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
44 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
45 int mbe_image_surface_get_stride(mbe_surface_t *surface) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
46 int mbe_image_surface_get_height(mbe_surface_t *surface) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
47 int mbe_image_surface_get_width(mbe_surface_t *surface) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
48 unsigned char *mbe_image_surface_get_data(mbe_surface_t *surface) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
49 mbe_surface_t *mbe_image_surface_create_from_png(const char *filename) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
50 mbe_surface_t * |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
51 mbe_image_surface_create_for_data(unsigned char *data, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
52 mb_img_fmt_t fmt, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
53 int width, int height, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
54 int stride) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
55 mb_img_fmt_t mbe_image_surface_get_format(mbe_surface_t *surface) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
56 mbe_surface_t * |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
57 mbe_image_surface_create(mb_img_fmt_t fmt, int width, int height) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
58 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
59 mbe_scaled_font_t *mbe_scaled_font_reference(mbe_scaled_font_t *scaled) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
60 void mbe_scaled_font_destroy(mbe_scaled_font_t *scaled) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
61 mbe_font_face_t *mbe_font_face_reference(mbe_font_face_t *face) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
62 mbe_scaled_font_t * |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
63 mbe_scaled_font_create(mbe_font_face_t *face, mbe_matrix_t *fnt_mtx, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
64 mbe_matrix_t *ctm) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
65 mbe_scaled_font_t *mbe_get_scaled_font(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
66 void mbe_scaled_font_text_extents(mbe_scaled_font_t *scaled, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
67 const char *txt, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
68 mbe_text_extents_t *extents) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
69 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
70 void mbe_font_face_destroy(mbe_font_face_t *face) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
71 void mbe_paint_with_alpha(mbe_t *canvas, co_aix alpha) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
72 void mbe_surface_destroy(mbe_surface_t *surface) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
73 void mbe_set_source_rgba(mbe_t *canvas, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
74 co_aix r, co_aix g, co_aix b, co_aix a) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
75 void mbe_set_scaled_font(mbe_t *canvas, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
76 const mbe_scaled_font_t *scaled) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
77 void mbe_set_source_rgb(mbe_t *canvas, co_aix r, co_aix g, co_aix b) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
78 void mbe_set_line_width(mbe_t *canvas, co_aix width) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
79 mbe_font_face_t *mbe_get_font_face(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
80 void mbe_fill_preserve(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
81 void mbe_set_source(mbe_t *canvas, mbe_pattern_t *source) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
82 void mbe_reset_clip(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
83 mbe_surface_t *mbe_get_target(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
84 void mbe_close_path(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
85 void mbe_text_path(mbe_t *canvas, const char *txt) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
86 void mbe_rectangle(mbe_t *canvas, co_aix x, co_aix y, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
87 co_aix width, co_aix height) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
88 int mbe_in_stroke(mbe_t *canvas, co_aix x, co_aix y) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
89 void mbe_new_path(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
90 void mbe_curve_to(mbe_t *canvas, co_aix x1, co_aix y1, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
91 co_aix x2, co_aix y2, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
92 co_aix x3, co_aix y3) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
93 void mbe_restore(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
94 void mbe_move_to(mbe_t *canvas, co_aix x, co_aix y) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
95 void mbe_line_to(mbe_t *canvas, co_aix x, co_aix y) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
96 int mbe_in_fill(mbe_t *canvas, co_aix x, co_aix y) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
97 void mbe_stroke(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
98 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
99 mbe_t *mbe_create(mbe_surface_t *target) { |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
100 mbe_t *mbe; |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
101 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
102 mbe = malloc(sizeof(_mbe_t)); |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
103 if(mbe == NULL) |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
104 return NULL; |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
105 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
106 mbe->canvas = new SkCanvas(target); |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
107 mbe->shader = NULL; |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
108 mbe->shader_owned = 0; |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
109 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
110 return mbe; |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
111 } |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
112 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
113 void mbe_destroy(mbe_t *canvas) { |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
114 delete cnavas->canvas; |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
115 if(cnavas->shader && cnavas->shader_owned) |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
116 delete cnavas->shader; |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
117 free(canvas); |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
118 } |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
119 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
120 void mbe_paint(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
121 void mbe_save(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
122 void mbe_fill(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
123 void mbe_clip(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
124 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
125 mbe_font_face_t * mbe_query_font_face(const char *family, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
126 int slant, int weight) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
127 void mbe_free_font_face(mbe_font_face_t *face) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
128 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
129 void mbe_clear(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
130 void mbe_copy_source(mbe_t *canvas) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
131 void mbe_transform(mbe_t *mbe, mbe_matrix_t *matrix) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
132 void mbe_arc(mbe_t *mbe, co_aix x, co_aix y, co_aix radius, |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
133 co_aix angle_start, co_aix angle_stop) {} |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
134 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
135 |
4254eaa699d0
Declare functions that should be implemented by Skia graphic engine
Thinker K.F. Li <thinker@branda.to>
parents:
469
diff
changeset
|
136 C_END |