comparison src/redraw_man.c @ 450:a417fd980228

Replace cairo_format_t with mb_img_fmt_t. - Replace all CAIRO_FORAMT_* with MB_IFMT_* - wrap functions return or are argumented with image format.
author Thinker K.F. Li <thinker@branda.to>
date Wed, 05 Aug 2009 15:54:44 +0800
parents 16116d84bc5e
children cd6f57b9b104
comparison
equal deleted inserted replaced
449:c525edac917e 450:a417fd980228
510 static mbe_t *canvas_new(int w, int h) { 510 static mbe_t *canvas_new(int w, int h) {
511 #ifndef UNITTEST 511 #ifndef UNITTEST
512 mbe_surface_t *surface; 512 mbe_surface_t *surface;
513 mbe_t *cr; 513 mbe_t *cr;
514 514
515 surface = mbe_image_surface_create(CAIRO_FORMAT_ARGB32, 515 surface = mbe_image_surface_create(MB_IFMT_ARGB32,
516 w, h); 516 w, h);
517 cr = mbe_create(surface); 517 cr = mbe_create(surface);
518 518
519 return cr; 519 return cr;
520 #else 520 #else
1866 #ifndef UNITTEST 1866 #ifndef UNITTEST
1867 static void clear_canvas(canvas_t *canvas) { 1867 static void clear_canvas(canvas_t *canvas) {
1868 mbe_operator_t old_op; 1868 mbe_operator_t old_op;
1869 1869
1870 old_op = mbe_get_operator(canvas); 1870 old_op = mbe_get_operator(canvas);
1871 mbe_set_operator(canvas, CAIRO_OPERATOR_CLEAR); 1871 mbe_set_operator(canvas, MBE_OPERATOR_CLEAR);
1872 mbe_paint(canvas); 1872 mbe_paint(canvas);
1873 mbe_set_operator(canvas, old_op); 1873 mbe_set_operator(canvas, old_op);
1874 } 1874 }
1875 1875
1876 static void make_clip(mbe_t *cr, int n_dirty_areas, 1876 static void make_clip(mbe_t *cr, int n_dirty_areas,
1896 1896
1897 if(n_dirty_areas) 1897 if(n_dirty_areas)
1898 make_clip(rdman->backend, n_dirty_areas, dirty_areas); 1898 make_clip(rdman->backend, n_dirty_areas, dirty_areas);
1899 1899
1900 saved_op = mbe_get_operator(rdman->backend); 1900 saved_op = mbe_get_operator(rdman->backend);
1901 mbe_set_operator(rdman->backend, CAIRO_OPERATOR_SOURCE); 1901 mbe_set_operator(rdman->backend, MBE_OPERATOR_SOURCE);
1902 mbe_paint(rdman->backend); 1902 mbe_paint(rdman->backend);
1903 mbe_set_operator(rdman->backend, saved_op); 1903 mbe_set_operator(rdman->backend, saved_op);
1904 } 1904 }
1905 #else /* UNITTEST */ 1905 #else /* UNITTEST */
1906 static void make_clip(mbe_t *cr, int n_dirty_areas, 1906 static void make_clip(mbe_t *cr, int n_dirty_areas,