diff 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
line wrap: on
line diff
--- a/src/X_main.c	Thu Nov 12 21:31:10 2009 +0800
+++ b/src/X_main.c	Thu Nov 12 21:31:14 2009 +0800
@@ -122,6 +122,7 @@
 void draw_path(mbe_t *cr, int w, int h) {
     mbe_t *tmpcr;
     mbe_surface_t *tmpsuf;
+    mbe_pattern_t *tmpptn;
     redraw_man_t rdman;
     shape_t *path1, *path2, *rect;
     coord_t *coord1, *coord2, *coord3;
@@ -141,9 +142,10 @@
     PangoAttrList *attrs = pango_attr_list_new();
 
     tmpsuf = mbe_image_surface_create(MB_IFMT_ARGB32, w, h);
+    tmpptn = mbe_pattern_create_for_surface(tmpsuf);
     tmpcr = mbe_create(tmpsuf);
 
-    mbe_set_source_surface(cr, tmpsuf, 0, 0);
+    mbe_set_source(cr, tmpptn);
     redraw_man_init(&rdman, tmpcr, cr);
     coord1 = rdman_coord_new(&rdman, rdman.root_coord);
     coord2 = rdman_coord_new(&rdman, rdman.root_coord);