diff options
Diffstat (limited to 'src/eom-scroll-view.c')
-rw-r--r-- | src/eom-scroll-view.c | 695 |
1 files changed, 0 insertions, 695 deletions
diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c index fb5acc3..9b9f0d0 100644 --- a/src/eom-scroll-view.c +++ b/src/eom-scroll-view.c @@ -15,9 +15,6 @@ #include "eom-marshal.h" #include "eom-scroll-view.h" #include "eom-debug.h" -#if 0 -#include "uta.h" -#endif #include "zoom.h" #include <gdk/gdk.h> @@ -52,15 +49,6 @@ typedef enum { ZOOM_MODE_FREE /* The image remains at its current zoom factor even if the scrollview changes size */ } ZoomMode; -#if 0 -/* Progressive loading state */ -typedef enum { - PROGRESSIVE_NONE, /* We are not loading an image or it is already loaded */ - PROGRESSIVE_LOADING, /* An image is being loaded */ - PROGRESSIVE_POLISHING /* We have finished loading an image but have not scaled it with interpolation */ -} ProgressiveState; -#endif - /* Signal IDs */ enum { SIGNAL_ZOOM_CHANGED, @@ -124,13 +112,6 @@ struct _EomScrollViewPrivate { /* Current scrolling offsets */ int xofs, yofs; -#if 0 - /* Microtile arrays for dirty region. This represents the dirty region - * for interpolated drawing. - */ - EomUta *uta; -#endif - /* handler ID for paint idle callback */ guint idle_id; @@ -151,11 +132,6 @@ struct _EomScrollViewPrivate { int drag_ofs_x, drag_ofs_y; guint dragging : 1; -#if 0 - /* status of progressive loading */ - ProgressiveState progressive_state; -#endif - /* how to indicate transparency in images */ EomTransparencyStyle transp_style; guint32 transp_color; @@ -494,18 +470,6 @@ check_scrollbar_visibility (EomScrollView *view, GtkAllocation *alloc) #define DOUBLE_EQUAL_MAX_DIFF 1e-6 #define DOUBLE_EQUAL(a,b) (fabs (a - b) < DOUBLE_EQUAL_MAX_DIFF) -#if 0 -/* Returns whether the zoom factor is 1.0 */ -static gboolean -is_unity_zoom (EomScrollView *view) -{ - EomScrollViewPrivate *priv; - - priv = view->priv; - return DOUBLE_EQUAL (priv->zoom, 1.0); -} -#endif - /* Returns whether the image is zoomed in */ static gboolean is_zoomed_in (EomScrollView *view) @@ -539,74 +503,10 @@ is_image_movable (EomScrollView *view) return (gtk_widget_get_visible (priv->hbar) || gtk_widget_get_visible (priv->vbar)); } - -/* Computes the image offsets with respect to the window */ -/* -static void -get_image_offsets (EomScrollView *view, int *xofs, int *yofs) -{ - EomScrollViewPrivate *priv; - int scaled_width, scaled_height; - int width, height; - - priv = view->priv; - - compute_scaled_size (view, priv->zoom, &scaled_width, &scaled_height); - - width = GTK_WIDGET (priv->display)->allocation.width; - height = GTK_WIDGET (priv->display)->allocation.height; - - // Compute image offsets with respect to the window - if (scaled_width <= width) - *xofs = (width - scaled_width) / 2; - else - *xofs = -priv->xofs; - - if (scaled_height <= height) - *yofs = (height - scaled_height) / 2; - else - *yofs = -priv->yofs; -} -*/ - /*=================================== drawing core ---------------------------------*/ - -#if 0 -/* Pulls a rectangle from the specified microtile array. The rectangle is the - * first one that would be glommed together by art_rect_list_from_uta(), and its - * size is bounded by max_width and max_height. The rectangle is also removed - * from the microtile array. - */ -static void -pull_rectangle (EomUta *uta, EomIRect *rect, int max_width, int max_height) -{ - uta_find_first_glom_rect (uta, rect, max_width, max_height); - uta_remove_rect (uta, rect->x0, rect->y0, rect->x1, rect->y1); -} - -/* Paints a rectangle with the background color if the specified rectangle - * intersects the dirty rectangle. - */ -static void -paint_background (EomScrollView *view, EomIRect *r, EomIRect *rect) -{ - EomScrollViewPrivate *priv; - EomIRect d; - - priv = view->priv; - - eom_irect_intersect (&d, r, rect); - if (!eom_irect_empty (&d)) { - gdk_window_clear_area (gtk_widget_get_window (priv->display), - d.x0, d.y0, - d.x1 - d.x0, d.y1 - d.y0); - } -} -#endif - static void get_transparency_params (EomScrollView *view, int *size, guint32 *color1, guint32 *color2) { @@ -675,447 +575,7 @@ create_background_surface (EomScrollView *view) return surface; } -#if 0 -#ifdef HAVE_RSVG -static cairo_surface_t * -create_background_surface (EomScrollView *view) -{ - int check_size; - guint32 check_1 = 0; - guint32 check_2 = 0; - cairo_surface_t *surface; - cairo_t *check_cr; - - get_transparency_params (view, &check_size, &check_1, &check_2); - - surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, check_size * 2, check_size * 2); - check_cr = cairo_create (surface); - cairo_set_source_rgba (check_cr, - ((check_1 & 0xff0000) >> 16) / 255., - ((check_1 & 0x00ff00) >> 8) / 255., - (check_1 & 0x0000ff) / 255., - 1.); - cairo_rectangle (check_cr, 0., 0., check_size, check_size); - cairo_fill (check_cr); - cairo_translate (check_cr, check_size, check_size); - cairo_rectangle (check_cr, 0., 0., check_size, check_size); - cairo_fill (check_cr); - - cairo_set_source_rgba (check_cr, - ((check_2 & 0xff0000) >> 16) / 255., - ((check_2 & 0x00ff00) >> 8) / 255., - (check_2 & 0x0000ff) / 255., - 1.); - cairo_translate (check_cr, -check_size, 0); - cairo_rectangle (check_cr, 0., 0., check_size, check_size); - cairo_fill (check_cr); - cairo_translate (check_cr, check_size, -check_size); - cairo_rectangle (check_cr, 0., 0., check_size, check_size); - cairo_fill (check_cr); - cairo_destroy (check_cr); - - return surface; -} - -static void -draw_svg_background (EomScrollView *view, cairo_t *cr, EomIRect *render_rect, EomIRect *image_rect) -{ - EomScrollViewPrivate *priv; - - priv = view->priv; - - if (priv->background_surface == NULL) - priv->background_surface = create_background_surface (view); - - cairo_set_source_surface (cr, priv->background_surface, - - (render_rect->x0 - image_rect->x0) % (CHECK_MEDIUM * 2), - - (render_rect->y0 - image_rect->y0) % (CHECK_MEDIUM * 2)); - cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT); - cairo_rectangle (cr, - 0, - 0, - render_rect->x1 - render_rect->x0, - render_rect->y1 - render_rect->y0); - cairo_fill (cr); -} - -static cairo_surface_t * -draw_svg_on_image_surface (EomScrollView *view, EomIRect *render_rect, EomIRect *image_rect) -{ - EomScrollViewPrivate *priv; - cairo_t *cr; - cairo_surface_t *surface; - cairo_matrix_t matrix, translate, scale; - EomTransform *transform; - - priv = view->priv; - - surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, - render_rect->x1 - render_rect->x0, - render_rect->y1 - render_rect->y0); - cr = cairo_create (surface); - - cairo_save (cr); - draw_svg_background (view, cr, render_rect, image_rect); - cairo_restore (cr); - - cairo_matrix_init_identity (&matrix); - transform = eom_image_get_transform (priv->image); - if (transform) { - cairo_matrix_t affine; - double image_offset_x = 0., image_offset_y = 0.; - - eom_transform_get_affine (transform, &affine); - cairo_matrix_multiply (&matrix, &affine, &matrix); - - switch (eom_transform_get_transform_type (transform)) { - case EOM_TRANSFORM_ROT_90: - case EOM_TRANSFORM_FLIP_HORIZONTAL: - image_offset_x = (double) gdk_pixbuf_get_width (priv->pixbuf); - break; - case EOM_TRANSFORM_ROT_270: - case EOM_TRANSFORM_FLIP_VERTICAL: - image_offset_y = (double) gdk_pixbuf_get_height (priv->pixbuf); - break; - case EOM_TRANSFORM_ROT_180: - case EOM_TRANSFORM_TRANSPOSE: - case EOM_TRANSFORM_TRANSVERSE: - image_offset_x = (double) gdk_pixbuf_get_width (priv->pixbuf); - image_offset_y = (double) gdk_pixbuf_get_height (priv->pixbuf); - break; - case EOM_TRANSFORM_NONE: - default: - break; - } - - cairo_matrix_init_translate (&translate, image_offset_x, image_offset_y); - cairo_matrix_multiply (&matrix, &matrix, &translate); - } - - cairo_matrix_init_scale (&scale, priv->zoom, priv->zoom); - cairo_matrix_multiply (&matrix, &matrix, &scale); - cairo_matrix_init_translate (&translate, image_rect->x0, image_rect->y0); - cairo_matrix_multiply (&matrix, &matrix, &translate); - cairo_matrix_init_translate (&translate, -render_rect->x0, -render_rect->y0); - cairo_matrix_multiply (&matrix, &matrix, &translate); - - cairo_set_matrix (cr, &matrix); - - rsvg_handle_render_cairo (eom_image_get_svg (priv->image), cr); - cairo_destroy (cr); - - return surface; -} - -static void -draw_svg (EomScrollView *view, EomIRect *render_rect, EomIRect *image_rect) -{ - EomScrollViewPrivate *priv; - cairo_t *cr; - cairo_surface_t *surface; - GdkWindow *window; - - priv = view->priv; - - window = gtk_widget_get_window (GTK_WIDGET (priv->display)); - surface = draw_svg_on_image_surface (view, render_rect, image_rect); - - cr = gdk_cairo_create (window); - cairo_set_source_surface (cr, surface, render_rect->x0, render_rect->y0); - cairo_paint (cr); - cairo_destroy (cr); -} -#endif - -/* Paints a rectangle of the dirty region */ -static void -paint_rectangle (EomScrollView *view, EomIRect *rect, cairo_filter_t interp_type) -{ - EomScrollViewPrivate *priv; - GdkPixbuf *tmp; - char *str; - GtkAllocation allocation; - int scaled_width, scaled_height; - int xofs, yofs; - EomIRect r, d; - int check_size; - guint32 check_1 = 0; - guint32 check_2 = 0; - - priv = view->priv; - - if (!gtk_widget_is_drawable (priv->display)) - return; - - compute_scaled_size (view, priv->zoom, &scaled_width, &scaled_height); - - gtk_widget_get_allocation (GTK_WIDGET (priv->display), &allocation); - - if (scaled_width < 1 || scaled_height < 1) - { - r.x0 = 0; - r.y0 = 0; - r.x1 = allocation.width; - r.y1 = allocation.height; - paint_background (view, &r, rect); - return; - } - - /* Compute image offsets with respect to the window */ - - if (scaled_width <= allocation.width) - xofs = (allocation.width - scaled_width) / 2; - else - xofs = -priv->xofs; - - if (scaled_height <= allocation.height) - yofs = (allocation.height - scaled_height) / 2; - else - yofs = -priv->yofs; - - eom_debug_message (DEBUG_WINDOW, "zoom %.2f, xofs: %i, yofs: %i scaled w: %i h: %i\n", - priv->zoom, xofs, yofs, scaled_width, scaled_height); - - /* Draw background if necessary, in four steps */ - - /* Top */ - if (yofs > 0) { - r.x0 = 0; - r.y0 = 0; - r.x1 = allocation.width; - r.y1 = yofs; - paint_background (view, &r, rect); - } - - /* Left */ - if (xofs > 0) { - r.x0 = 0; - r.y0 = yofs; - r.x1 = xofs; - r.y1 = yofs + scaled_height; - paint_background (view, &r, rect); - } - - /* Right */ - if (xofs >= 0) { - r.x0 = xofs + scaled_width; - r.y0 = yofs; - r.x1 = allocation.width; - r.y1 = yofs + scaled_height; - if (r.x0 < r.x1) - paint_background (view, &r, rect); - } - - /* Bottom */ - if (yofs >= 0) { - r.x0 = 0; - r.y0 = yofs + scaled_height; - r.x1 = allocation.width; - r.y1 = allocation.height; - if (r.y0 < r.y1) - paint_background (view, &r, rect); - } - - - /* Draw the scaled image - * - * FIXME: this is not using the color correction tables! - */ - - if (!priv->pixbuf) - return; - - r.x0 = xofs; - r.y0 = yofs; - r.x1 = xofs + scaled_width; - r.y1 = yofs + scaled_height; - - eom_irect_intersect (&d, &r, rect); - if (eom_irect_empty (&d)) - return; - - switch (interp_type) { - case CAIRO_FILTER_NEAREST: - str = "NEAREST"; - break; - default: - str = "ALIASED"; - } - - eom_debug_message (DEBUG_WINDOW, "%s: x0: %i,\t y0: %i,\t x1: %i,\t y1: %i\n", - str, d.x0, d.y0, d.x1, d.y1); - -#ifdef HAVE_RSVG - if (eom_image_is_svg (view->priv->image) && interp_type != CAIRO_FILTER_NEAREST) { - draw_svg (view, &d, &r); - return; - } -#endif - /* Short-circuit the fast case to avoid a memcpy() */ - - if (is_unity_zoom (view) - && gdk_pixbuf_get_colorspace (priv->pixbuf) == GDK_COLORSPACE_RGB - && !gdk_pixbuf_get_has_alpha (priv->pixbuf) - && gdk_pixbuf_get_bits_per_sample (priv->pixbuf) == 8) { - guchar *pixels; - int rowstride; - - rowstride = gdk_pixbuf_get_rowstride (priv->pixbuf); - - pixels = (gdk_pixbuf_get_pixels (priv->pixbuf) - + (d.y0 - yofs) * rowstride - + 3 * (d.x0 - xofs)); - - gdk_draw_rgb_image_dithalign (gtk_widget_get_window (GTK_WIDGET (priv->display)), - gtk_widget_get_style (GTK_WIDGET (priv->display))->black_gc, - d.x0, d.y0, - d.x1 - d.x0, d.y1 - d.y0, - GDK_RGB_DITHER_MAX, - pixels, - rowstride, - d.x0 - xofs, d.y0 - yofs); - return; - } - - /* For all other cases, create a temporary pixbuf */ - - tmp = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, d.x1 - d.x0, d.y1 - d.y0); - - if (!tmp) { - g_message ("paint_rectangle(): Could not allocate temporary pixbuf of " - "size (%d, %d); skipping", d.x1 - d.x0, d.y1 - d.y0); - return; - } - - /* Compute transparency parameters */ - get_transparency_params (view, &check_size, &check_1, &check_2); - - /* Draw! */ - gdk_pixbuf_composite_color (priv->pixbuf, - tmp, - 0, 0, - d.x1 - d.x0, d.y1 - d.y0, - -(d.x0 - xofs), -(d.y0 - yofs), - priv->zoom, priv->zoom, - is_unity_zoom (view) ? CAIRO_FILTER_NEAREST : interp_type, - 255, - d.x0 - xofs, d.y0 - yofs, - check_size, - check_1, check_2); - - gdk_draw_rgb_image_dithalign (gtk_widget_get_window (priv->display), - gtk_widget_get_style (priv->display)->black_gc, - d.x0, d.y0, - d.x1 - d.x0, d.y1 - d.y0, - GDK_RGB_DITHER_MAX, - gdk_pixbuf_get_pixels (tmp), - gdk_pixbuf_get_rowstride (tmp), - d.x0 - xofs, d.y0 - yofs); - - g_object_unref (tmp); -} - - -/* Idle handler for the drawing process. We pull a rectangle from the dirty - * region microtile array, paint it, and leave the rest to the next idle - * iteration. - */ -static gboolean -paint_iteration_idle (gpointer data) -{ - EomScrollView *view; - EomScrollViewPrivate *priv; - EomIRect rect; - - view = EOM_SCROLL_VIEW (data); - priv = view->priv; - - g_assert (priv->uta != NULL); - - pull_rectangle (priv->uta, &rect, PAINT_RECT_WIDTH, PAINT_RECT_HEIGHT); - - if (eom_irect_empty (&rect)) { - eom_uta_free (priv->uta); - priv->uta = NULL; - } else { - if (is_zoomed_in (view)) - paint_rectangle (view, &rect, priv->interp_type_in); - else if (is_zoomed_out (view)) - paint_rectangle (view, &rect, priv->interp_type_out); - else - paint_rectangle (view, &rect, CAIRO_FILTER_NEAREST); - } - - if (!priv->uta) { - priv->idle_id = 0; - return FALSE; - } - - return TRUE; -} - -/* Paints the requested area in non-interpolated mode. Then, if we are - * configured to use interpolation, we queue an idle handler to redraw the area - * with interpolation. The area is in window coordinates. - */ -static void -request_paint_area (EomScrollView *view, GdkRectangle *area) -{ - EomScrollViewPrivate *priv; - EomIRect r; - GtkAllocation allocation; - - priv = view->priv; - - eom_debug_message (DEBUG_WINDOW, "x: %i, y: %i, width: %i, height: %i\n", - area->x, area->y, area->width, area->height); - - if (!gtk_widget_is_drawable (priv->display)) - return; - - gtk_widget_get_allocation (GTK_WIDGET (priv->display), &allocation); - r.x0 = MAX (0, area->x); - r.y0 = MAX (0, area->y); - r.x1 = MIN (allocation.width, area->x + area->width); - r.y1 = MIN (allocation.height, area->y + area->height); - - eom_debug_message (DEBUG_WINDOW, "r: %i, %i, %i, %i\n", r.x0, r.y0, r.x1, r.y1); - - if (r.x0 >= r.x1 || r.y0 >= r.y1) - return; - - /* Do nearest neighbor, 1:1 zoom or active progressive loading synchronously for speed. */ - if ((is_zoomed_in (view) && priv->interp_type_in == CAIRO_FILTER_NEAREST) || - (is_zoomed_out (view) && priv->interp_type_out == CAIRO_FILTER_NEAREST) || - is_unity_zoom (view) || - priv->progressive_state == PROGRESSIVE_LOADING) { - paint_rectangle (view, &r, CAIRO_FILTER_NEAREST); - return; - } - - if (priv->progressive_state == PROGRESSIVE_POLISHING) - /* We have already a complete image with nearest neighbor mode. - * It's sufficient to add only a antitaliased idle update - */ - priv->progressive_state = PROGRESSIVE_NONE; - else if (!priv->image || !eom_image_is_animation (priv->image)) - /* do nearest neigbor before anti aliased version, - except for animations to avoid a "blinking" effect. */ - paint_rectangle (view, &r, CAIRO_FILTER_NEAREST); - - /* All other interpolation types are delayed. */ - if (priv->uta) - g_assert (priv->idle_id != 0); - else { - g_assert (priv->idle_id == 0); - priv->idle_id = g_idle_add (paint_iteration_idle, view); - } - - priv->uta = uta_add_rect (priv->uta, r.x0, r.y0, r.x1, r.y1); -} -#endif - /* ======================================= scrolling stuff @@ -1131,11 +591,6 @@ scroll_to (EomScrollView *view, int x, int y, gboolean change_adjustments) GtkAllocation allocation; int xofs, yofs; GdkWindow *window; -#if 0 - int src_x, src_y; - int dest_x, dest_y; - int twidth, theight; -#endif priv = view->priv; @@ -1172,34 +627,6 @@ scroll_to (EomScrollView *view, int x, int y, gboolean change_adjustments) window = gtk_widget_get_window (GTK_WIDGET (priv->display)); - /* Ensure that the uta has the full size */ -#if 0 - twidth = (allocation.width + EOM_UTILE_SIZE - 1) >> EOM_UTILE_SHIFT; - theight = (allocation.height + EOM_UTILE_SIZE - 1) >> EOM_UTILE_SHIFT; - -#if 0 - if (priv->uta) - g_assert (priv->idle_id != 0); - else - priv->idle_id = g_idle_add (paint_iteration_idle, view); -#endif - - priv->uta = uta_ensure_size (priv->uta, 0, 0, twidth, theight); - - /* Copy the uta area. Our synchronous handling of expose events, below, - * will queue the new scrolled-in areas. - */ - src_x = xofs < 0 ? 0 : xofs; - src_y = yofs < 0 ? 0 : yofs; - dest_x = xofs < 0 ? -xofs : 0; - dest_y = yofs < 0 ? -yofs : 0; - - uta_copy_area (priv->uta, - src_x, src_y, - dest_x, dest_y, - allocation.width - abs (xofs), - allocation.height - abs (yofs)); -#endif /* Scroll the window area and process exposure synchronously. */ gdk_window_scroll (window, -xofs, -yofs); @@ -1941,108 +1368,6 @@ display_expose_event (GtkWidget *widget, GdkEventExpose *event, gpointer data) image loading callbacks -----------------------------------*/ -/* -static void -image_loading_update_cb (EomImage *img, int x, int y, int width, int height, gpointer data) -{ - EomScrollView *view; - EomScrollViewPrivate *priv; - GdkRectangle area; - int xofs, yofs; - int sx0, sy0, sx1, sy1; - - view = (EomScrollView*) data; - priv = view->priv; - - eom_debug_message (DEBUG_IMAGE_LOAD, "x: %i, y: %i, width: %i, height: %i\n", - x, y, width, height); - - if (priv->pixbuf == NULL) { - priv->pixbuf = eom_image_get_pixbuf (img); - set_zoom_fit (view); - check_scrollbar_visibility (view, NULL); - } - priv->progressive_state = PROGRESSIVE_LOADING; - - get_image_offsets (view, &xofs, &yofs); - - sx0 = floor (x * priv->zoom + xofs); - sy0 = floor (y * priv->zoom + yofs); - sx1 = ceil ((x + width) * priv->zoom + xofs); - sy1 = ceil ((y + height) * priv->zoom + yofs); - - area.x = sx0; - area.y = sy0; - area.width = sx1 - sx0; - area.height = sy1 - sy0; - - if (GTK_WIDGET_DRAWABLE (priv->display)) - gdk_window_invalidate_rect (GTK_WIDGET (priv->display)->window, &area, FALSE); -} - - -static void -image_loading_finished_cb (EomImage *img, gpointer data) -{ - EomScrollView *view; - EomScrollViewPrivate *priv; - - view = (EomScrollView*) data; - priv = view->priv; - - if (priv->pixbuf == NULL) { - priv->pixbuf = eom_image_get_pixbuf (img); - priv->progressive_state = PROGRESSIVE_NONE; - set_zoom_fit (view); - check_scrollbar_visibility (view, NULL); - gtk_widget_queue_draw (GTK_WIDGET (priv->display)); - - } - else if (priv->interp_type != CAIRO_FILTER_NEAREST && - !is_unity_zoom (view)) - { - // paint antialiased image version - priv->progressive_state = PROGRESSIVE_POLISHING; - gtk_widget_queue_draw (GTK_WIDGET (priv->display)); - } -} - -static void -image_loading_failed_cb (EomImage *img, char *msg, gpointer data) -{ - EomScrollViewPrivate *priv; - - priv = EOM_SCROLL_VIEW (data)->priv; - - g_print ("loading failed: %s.\n", msg); - - if (priv->pixbuf != 0) { - g_object_unref (priv->pixbuf); - priv->pixbuf = 0; - } - - if (GTK_WIDGET_DRAWABLE (priv->display)) { - gdk_window_clear (GTK_WIDGET (priv->display)->window); - } -} - -static void -image_loading_cancelled_cb (EomImage *img, gpointer data) -{ - EomScrollViewPrivate *priv; - - priv = EOM_SCROLL_VIEW (data)->priv; - - if (priv->pixbuf != NULL) { - g_object_unref (priv->pixbuf); - priv->pixbuf = NULL; - } - - if (GTK_WIDGET_DRAWABLE (priv->display)) { - gdk_window_clear (GTK_WIDGET (priv->display)->window); - } -} -*/ /* Use when the pixbuf in the view is changed, to keep a reference to it and create its cairo surface. */ @@ -2381,27 +1706,16 @@ eom_scroll_view_set_image (EomScrollView *view, EomImage *image) g_assert (priv->image == NULL); g_assert (priv->pixbuf == NULL); - /* priv->progressive_state = PROGRESSIVE_NONE; */ if (image != NULL) { eom_image_data_ref (image); if (priv->pixbuf == NULL) { update_pixbuf (view, eom_image_get_pixbuf (image)); - /* priv->progressive_state = PROGRESSIVE_NONE; */ set_zoom_fit (view); check_scrollbar_visibility (view, NULL); gtk_widget_queue_draw (GTK_WIDGET (priv->display)); } -#if 0 - else if ((is_zoomed_in (view) && priv->interp_type_in != CAIRO_FILTER_NEAREST) || - (is_zoomed_out (view) && priv->interp_type_out != CAIRO_FILTER_NEAREST)) - { - /* paint antialiased image version */ - priv->progressive_state = PROGRESSIVE_POLISHING; - gtk_widget_queue_draw (GTK_WIDGET (priv->display)); - } -#endif priv->image_changed_id = g_signal_connect (image, "changed", (GCallback) image_changed_cb, view); @@ -2482,7 +1796,6 @@ eom_scroll_view_init (EomScrollView *view) priv->min_zoom = MIN_ZOOM_FACTOR; priv->zoom_mode = ZOOM_MODE_FIT; priv->upscale = FALSE; - /* priv->uta = NULL; */ priv->interp_type_in = CAIRO_FILTER_BILINEAR; priv->interp_type_out = CAIRO_FILTER_BILINEAR; priv->scroll_wheel_zoom = FALSE; @@ -2490,7 +1803,6 @@ eom_scroll_view_init (EomScrollView *view) priv->image = NULL; priv->pixbuf = NULL; priv->surface = NULL; - /* priv->progressive_state = PROGRESSIVE_NONE; */ priv->transp_style = EOM_TRANSP_BACKGROUND; priv->transp_color = 0; priv->cursor = EOM_SCROLL_VIEW_CURSOR_NORMAL; @@ -2629,13 +1941,6 @@ eom_scroll_view_dispose (GObject *object) view = EOM_SCROLL_VIEW (object); priv = view->priv; -#if 0 - if (priv->uta != NULL) { - eom_uta_free (priv->uta); - priv->uta = NULL; - } -#endif - if (priv->idle_id != 0) { g_source_remove (priv->idle_id); priv->idle_id = 0; |