Mercurial > MadButterfly
diff src/paint.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 | ba64f928542b |
line wrap: on
line diff
--- a/src/paint.c Tue Aug 04 23:47:34 2009 +0800 +++ b/src/paint.c Wed Aug 05 15:54:44 2009 +0800 @@ -290,25 +290,7 @@ paint_t *rdman_paint_image_new(redraw_man_t *rdman, mb_img_data_t *img) { paint_image_t *paint; - int fmt; - switch(img->fmt) { - case MB_IFMT_ARGB32: - fmt = CAIRO_FORMAT_ARGB32; - break; - case MB_IFMT_RGB24: - fmt = CAIRO_FORMAT_RGB24; - break; - case MB_IFMT_A8: - fmt = CAIRO_FORMAT_A8; - break; - case MB_IFMT_A1: - fmt = CAIRO_FORMAT_A1; - break; - default: - return NULL; - } - paint = O_ALLOC(paint_image_t); if(paint == NULL) return NULL; @@ -317,7 +299,7 @@ paint_image_prepare, paint_image_free); paint->img = img; paint->surf = mbe_image_surface_create_for_data(img->content, - fmt, + img->fmt, img->w, img->h, img->stride);