+/*** Images ***/
+static EvImage *
+ev_view_get_image_at_location (EvView *view,
+ gdouble x,
+ gdouble y)
+{
+ gint page = -1;
+ gint x_offset = 0, y_offset = 0;
+ gint x_new = 0, y_new = 0;
+ GList *image_mapping;
+
+ if (!EV_IS_DOCUMENT_IMAGES (view->document))
+ return NULL;
+
+ x += view->scroll_x;
+ y += view->scroll_y;
+
+ find_page_at_location (view, x, y, &page, &x_offset, &y_offset);
+
+ if (page == -1)
+ return NULL;
+
+ if (get_doc_point_from_offset (view, page, x_offset,
+ y_offset, &x_new, &y_new) == FALSE)
+ return NULL;
+
+ image_mapping = ev_pixbuf_cache_get_image_mapping (view->pixbuf_cache, page);
+
+ if (image_mapping)
+ return ev_image_mapping_find (image_mapping, x_new, y_new);
+ else
+ return NULL;
+}
+