- /* Get the selection pixbuf iff we have something to draw */
- if (current_pixbuf && view->selection_mode == EV_VIEW_SELECTION_TEXT && selection)
- selection_pixbuf = ev_pixbuf_cache_get_selection_pixbuf (view->pixbuf_cache,
- page,
- view->scale,
- NULL);
-
- if (current_pixbuf == NULL)
- scaled_image = NULL;
- else if (width == gdk_pixbuf_get_width (current_pixbuf) &&
- height == gdk_pixbuf_get_height (current_pixbuf))
- scaled_image = g_object_ref (current_pixbuf);
- else
- /* FIXME: We don't want to scale the whole area, just the right
- * area of it */
- scaled_image = gdk_pixbuf_scale_simple (current_pixbuf,
- width, height,
- GDK_INTERP_NEAREST);
-
- if (selection_pixbuf == NULL)
- scaled_selection = NULL;
- else if (width == gdk_pixbuf_get_width (selection_pixbuf) &&
- height == gdk_pixbuf_get_height (selection_pixbuf))
- scaled_selection = g_object_ref (selection_pixbuf);
- else
- /* FIXME: We don't want to scale the whole area, just the right
- * area of it */
- scaled_selection = gdk_pixbuf_scale_simple (selection_pixbuf,
- width, height,
- GDK_INTERP_NEAREST);
-
- if (scaled_image) {
- gdk_draw_pixbuf (GTK_WIDGET(view)->window,
- GTK_WIDGET (view)->style->fg_gc[GTK_STATE_NORMAL],
- scaled_image,
- overlap.x - real_page_area.x,
- overlap.y - real_page_area.y,
- overlap.x, overlap.y,
- overlap.width, overlap.height,
- GDK_RGB_DITHER_NORMAL,
- 0, 0);
- g_object_unref (scaled_image);
- } else {