comparison src/X_main.c @ 471:e98ae1407ca2 Android_Skia

Remove mbe_set_source_surface() from graphic engine. Since mbe_set_source() and mbe_pattern_create_for_surface() can replace mbe_set_source_surface(), mbe_set_source_surface() is removed to reduce number of functions in graphic engine layer.
author Thinker K.F. Li <thinker@branda.to>
date Thu, 12 Nov 2009 21:31:14 +0800
parents 5c9e2a8a4bd8
children 586e50f82c1f
comparison
equal deleted inserted replaced
470:e54cd19cec28 471:e98ae1407ca2
120 } 120 }
121 121
122 void draw_path(mbe_t *cr, int w, int h) { 122 void draw_path(mbe_t *cr, int w, int h) {
123 mbe_t *tmpcr; 123 mbe_t *tmpcr;
124 mbe_surface_t *tmpsuf; 124 mbe_surface_t *tmpsuf;
125 mbe_pattern_t *tmpptn;
125 redraw_man_t rdman; 126 redraw_man_t rdman;
126 shape_t *path1, *path2, *rect; 127 shape_t *path1, *path2, *rect;
127 coord_t *coord1, *coord2, *coord3; 128 coord_t *coord1, *coord2, *coord3;
128 paint_t *fill1, *fill2, *fill3; 129 paint_t *fill1, *fill2, *fill3;
129 paint_t *text_fill; 130 paint_t *text_fill;
139 mb_word_t *word; 140 mb_word_t *word;
140 mb_action_t *act; 141 mb_action_t *act;
141 PangoAttrList *attrs = pango_attr_list_new(); 142 PangoAttrList *attrs = pango_attr_list_new();
142 143
143 tmpsuf = mbe_image_surface_create(MB_IFMT_ARGB32, w, h); 144 tmpsuf = mbe_image_surface_create(MB_IFMT_ARGB32, w, h);
145 tmpptn = mbe_pattern_create_for_surface(tmpsuf);
144 tmpcr = mbe_create(tmpsuf); 146 tmpcr = mbe_create(tmpsuf);
145 147
146 mbe_set_source_surface(cr, tmpsuf, 0, 0); 148 mbe_set_source(cr, tmpptn);
147 redraw_man_init(&rdman, tmpcr, cr); 149 redraw_man_init(&rdman, tmpcr, cr);
148 coord1 = rdman_coord_new(&rdman, rdman.root_coord); 150 coord1 = rdman_coord_new(&rdman, rdman.root_coord);
149 coord2 = rdman_coord_new(&rdman, rdman.root_coord); 151 coord2 = rdman_coord_new(&rdman, rdman.root_coord);
150 coord3 = rdman_coord_new(&rdman, rdman.root_coord); 152 coord3 = rdman_coord_new(&rdman, rdman.root_coord);
151 153