X-Git-Url: https://git.stderr.nl/gitweb?p=rodin%2Fchimara.git;a=blobdiff_plain;f=libchimara%2Fgraphics.c;h=5735bcb34614cb68896a54c774b6f221b9dfb0cf;hp=21fcd09067937b6820d33069877f6d798758033b;hb=6a19bed210500ab8303a0e94d74adbf2ee0e2920;hpb=830faf4676d26eb8094688e5ee995c2e2edce0e5 diff --git a/libchimara/graphics.c b/libchimara/graphics.c index 21fcd09..5735bcb 100644 --- a/libchimara/graphics.c +++ b/libchimara/graphics.c @@ -139,7 +139,6 @@ image_cache_find(struct image_info* to_find) /* Empty cache */ if(link == NULL) { gdk_threads_leave(); - printf("Cache miss for image %d\n", to_find->resource_number); return NULL; } @@ -154,7 +153,6 @@ image_cache_find(struct image_info* to_find) if(info->width == to_find->width && info->height == to_find->height) { /* Prescaled image found */ gdk_threads_leave(); - printf("Exact cache hit for image %d\n", to_find->resource_number); return info; } else if(info->width >= to_find->width && info->height >= to_find->height) { @@ -165,7 +163,6 @@ image_cache_find(struct image_info* to_find) } else { if(!info->scaled) { gdk_threads_leave(); - printf("Exact cache hit for image %d\n", to_find->resource_number); return info; /* Found a match */ } } @@ -174,11 +171,6 @@ image_cache_find(struct image_info* to_find) gdk_threads_leave(); - if(match == NULL) - printf("Cache miss for image %d\n", to_find->resource_number); - else - printf("Approx cache hit for image %d\n", to_find->resource_number); - return match; } @@ -454,14 +446,15 @@ glk_window_fill_rect(winid_t win, glui32 color, glsi32 left, glsi32 top, glui32 VALID_WINDOW(win, return); g_return_if_fail(win->type == wintype_Graphics); - gdk_threads_enter(); GdkPixmap *map; gtk_image_get_pixmap( GTK_IMAGE(win->widget), &map, NULL ); GdkGC *gc = gdk_gc_new(map); - gdk_gc_set_foreground( gc, glkcolor_to_gdkcolor(color) ); + GdkColor gdkcolor; + glkcolor_to_gdkcolor(color, &gdkcolor); + gdk_gc_set_rgb_fg_color(gc, &gdkcolor); gdk_draw_rectangle( GDK_DRAWABLE(map), gc, TRUE, left, top, width, height); gtk_widget_queue_draw(win->widget); g_object_unref(gc);