comparison src/audacious/ui_skinned_playstatus.c @ 3077:4b076ad636e6

use GdkPixmaps for doublesizing
author Tomasz Mon <desowin@gmail.com>
date Sat, 14 Jul 2007 12:45:03 +0200
parents 84de3244aeaa
children 1faf842dea49
comparison
equal deleted inserted replaced
3076:7f1f6688c32c 3077:4b076ad636e6
206 case STATUS_PLAY: 206 case STATUS_PLAY:
207 skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 1, 0, 3, 0, 8, 9); 207 skin_draw_pixmap(bmp_active_skin, obj, gc, SKIN_PLAYPAUSE, 1, 0, 3, 0, 8, 9);
208 break; 208 break;
209 } 209 }
210 210
211 GdkPixmap *image; 211 GdkPixmap *image = NULL;
212 image = gdk_pixmap_new(NULL, playstatus->width*(1+playstatus->double_size),
213 playstatus->height*(1+playstatus->double_size),
214 gdk_rgb_get_visual()->depth);
215 212
216 if (playstatus->double_size) { 213 if (playstatus->double_size) {
217 GdkImage *img, *img2x; 214 image = create_dblsize_pixmap(obj);
218 img = gdk_drawable_get_image(obj, 0, 0, playstatus->width, playstatus->height); 215 } else {
219 img2x = create_dblsize_image(img); 216 image = gdk_pixmap_new(NULL, playstatus->width, playstatus->height, gdk_rgb_get_visual()->depth);
220 gdk_draw_image (image, gc, img2x, 0, 0, 0, 0, playstatus->width*2, playstatus->height*2);
221 g_object_unref(img2x);
222 g_object_unref(img);
223 } else
224 gdk_draw_drawable (image, gc, obj, 0, 0, 0, 0, playstatus->width, playstatus->height); 217 gdk_draw_drawable (image, gc, obj, 0, 0, 0, 0, playstatus->width, playstatus->height);
225 218 }
226 219
227 g_object_unref(obj); 220 g_object_unref(obj);
228 221
229 gdk_draw_drawable (widget->window, gc, image, 0, 0, 0, 0, 222 gdk_draw_drawable (widget->window, gc, image, 0, 0, 0, 0,
230 playstatus->width*(1+playstatus->double_size), playstatus->height*(1+playstatus->double_size)); 223 playstatus->width*(1+playstatus->double_size), playstatus->height*(1+playstatus->double_size));