comparison src/pixbuf-renderer.c @ 24:104e34f9ab1f

Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net> * image.c (image_change_from_image): Fix and use pixbuf_renderer_move. * pan-view.c: Convert back to ImageWindow from PixbufRenderer, so that focus and full screen work again. * pixbuf-renderer.[ch] (pixbuf_renderer_move): Add this function. ##### Note: GQview CVS on sourceforge is not always up to date, please use ##### ##### an offical release when making enhancements and translation updates. #####
author gqview
date Wed, 23 Mar 2005 05:29:45 +0000
parents 17acca639a86
children 0c3b353b666e
comparison
equal deleted inserted replaced
23:17acca639a86 24:104e34f9ab1f
3017 g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), NULL); 3017 g_return_val_if_fail(IS_PIXBUF_RENDERER(pr), NULL);
3018 3018
3019 return pr->pixbuf; 3019 return pr->pixbuf;
3020 } 3020 }
3021 3021
3022 void pixbuf_renderer_move(PixbufRenderer *pr, PixbufRenderer *source)
3023 {
3024 GObject *object;
3025 PixbufRendererScrollResetType scroll_reset;
3026
3027 g_return_if_fail(IS_PIXBUF_RENDERER(pr));
3028 g_return_if_fail(IS_PIXBUF_RENDERER(source));
3029
3030 if (pr == source) return;
3031
3032 object = G_OBJECT(pr);
3033
3034 g_object_set(object, "zoom_min", source->zoom_min, NULL);
3035 g_object_set(object, "zoom_max", source->zoom_max, NULL);
3036 g_object_set(object, "loading", source->loading, NULL);
3037
3038 pr->x_scroll = source->x_scroll;
3039 pr->y_scroll = source->y_scroll;
3040
3041 scroll_reset = pr->scroll_reset;
3042 pr->scroll_reset = PR_SCROLL_RESET_NOCHANGE;
3043
3044 if (source->source_tiles_enabled)
3045 {
3046 pr_source_tile_unset(pr);
3047
3048 pr->source_tiles_enabled = source->source_tiles_enabled;
3049 pr->source_tiles_cache_size = source->source_tiles_cache_size;
3050 pr->source_tile_width = source->source_tile_width;
3051 pr->source_tile_height = source->source_tile_height;
3052 pr->image_width = source->image_width;
3053 pr->image_height = source->image_height;
3054
3055 pr->func_tile_request = source->func_tile_request;
3056 pr->func_tile_dispose = source->func_tile_dispose;
3057 pr->func_tile_data = source->func_tile_data;
3058
3059 pr->source_tiles = source->source_tiles;
3060 source->source_tiles = NULL;
3061
3062 pr_zoom_sync(pr, pr->zoom, TRUE, FALSE, TRUE, FALSE, 0, 0);
3063 pr_redraw(pr, TRUE);
3064 }
3065 else
3066 {
3067 pixbuf_renderer_set_pixbuf(pr, source->pixbuf, source->zoom);
3068 }
3069
3070 pr->scroll_reset = scroll_reset;
3071
3072 pixbuf_renderer_set_pixbuf(source, NULL, source->zoom);
3073 }
3074
3022 void pixbuf_renderer_area_changed(PixbufRenderer *pr, gint x, gint y, gint width, gint height) 3075 void pixbuf_renderer_area_changed(PixbufRenderer *pr, gint x, gint y, gint width, gint height)
3023 { 3076 {
3024 gint sx, sy, sw, sh; 3077 gint sx, sy, sw, sh;
3025 3078
3026 g_return_if_fail(IS_PIXBUF_RENDERER(pr)); 3079 g_return_if_fail(IS_PIXBUF_RENDERER(pr));