From 00efc5c16ed191f07f9a8a5d00acc41ddb064b46 Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Sat, 06 Aug 2005 05:13:20 +0000 Subject: Clean up selection to be much smoother! Sat Aug 6 01:12:44 2005 Jonathan Blandford * NOTES: * backend/ev-selection.c: (ev_selection_render_selection): * backend/ev-selection.h: * pdf/ev-poppler.cc: * shell/ev-jobs.c: (ev_job_render_dispose), (ev_job_render_new), (ev_job_render_run): * shell/ev-jobs.h: * shell/ev-pixbuf-cache.c: (dispose_cache_job_info), (ev_pixbuf_cache_new), (job_finished_cb), (add_job_if_needed), (convert_gdk_color_to_uint), (ev_pixbuf_cache_get_text_mapping), (ev_pixbuf_cache_style_changed), (ev_pixbuf_cache_get_selection_pixbuf), (ev_pixbuf_cache_set_selection_list), (ev_pixbuf_cache_get_selection_list): * shell/ev-pixbuf-cache.h: * shell/ev-utils.c: (ev_print_region_contents): * shell/ev-utils.h: * shell/ev-view.c: (ev_view_queue_draw_page), (selection_update_idle_cb), (ev_view_motion_notify_event), (ev_view_style_set), (draw_one_page), (ev_view_class_init), (setup_caches), (ev_view_find_next), (merge_selection_region), (selection_free): * shell/ev-window.c: (ev_window_update_fullscreen_popup): Clean up selection to be much smoother! --- (limited to 'shell/ev-utils.c') diff --git a/shell/ev-utils.c b/shell/ev-utils.c index 587dd73..21563eb 100644 --- a/shell/ev-utils.c +++ b/shell/ev-utils.c @@ -177,6 +177,35 @@ ev_pixbuf_add_shadow (GdkPixbuf *src, int size, } +/* Simple function to output the contents of a region. Used solely for testing + * the region code. + */ +void +ev_print_region_contents (GdkRegion *region) +{ + GdkRectangle *rectangles = NULL; + gint n_rectangles, i; + + if (region == NULL) { + g_print ("\n"); + return; + } + + g_print ("\n", region); + gdk_region_get_rectangles (region, &rectangles, &n_rectangles); + for (i = 0; i < n_rectangles; i++) { + g_print ("\t(%d %d, %d %d) [%dx%d]\n", + rectangles[i].x, + rectangles[i].y, + rectangles[i].x + rectangles[i].width, + rectangles[i].y + rectangles[i].height, + rectangles[i].width, + rectangles[i].height); + } + g_free (rectangles); +} + + #ifndef HAVE_G_FILE_SET_CONTENTS #include -- cgit v0.9.1