comparison src/paint.c @ 268:43900cae1d49

Support resizing for image. - Programmers can change size of image that showed on the output device.
author Thinker K.F. Li <thinker@branda.to>
date Sat, 24 Jan 2009 18:19:02 +0800
parents b42ee279669e
children 04d22dc38bc0
comparison
equal deleted inserted replaced
267:cac3f084a9b1 268:43900cae1d49
309 309
310 paint_init(&paint->paint, paint_image_prepare, paint_image_free); 310 paint_init(&paint->paint, paint_image_prepare, paint_image_free);
311 paint->img = img; 311 paint->img = img;
312 paint->surf = cairo_image_surface_create_for_data(img->content, 312 paint->surf = cairo_image_surface_create_for_data(img->content,
313 fmt, 313 fmt,
314 img->width, 314 img->w,
315 img->height, 315 img->h,
316 img->stride); 316 img->stride);
317 if(paint->surf == NULL) { 317 if(paint->surf == NULL) {
318 paint_destroy(&paint->paint); 318 paint_destroy(&paint->paint);
319 free(paint); 319 free(paint);
320 return NULL; 320 return NULL;