int find_result;
int spacing;
+ EvOrientation orientation;
double scale;
gboolean continuous;
ev_pixbuf_cache_set_page_range (view->pixbuf_cache,
view->start_page,
view->end_page,
+ view->orientation,
view->scale,
view->selection_info.selections);
}
/* Get the size of the page */
ev_page_cache_get_size (view->page_cache, page,
+ view->orientation,
view->scale,
&width, &height);
compute_border (view, width, height, border);
if (other_page < ev_page_cache_get_n_pages (view->page_cache)) {
ev_page_cache_get_size (view->page_cache,
other_page,
+ view->orientation,
view->scale,
&width_2, &height_2);
if (width_2 > width)
/* Find the largest of the two. */
ev_page_cache_get_size (view->page_cache,
view->current_page,
+ view->orientation,
view->scale,
&width, &height);
if (view->current_page + 1 < ev_page_cache_get_n_pages (view->page_cache)) {
gint width_2, height_2;
ev_page_cache_get_size (view->page_cache,
view->current_page + 1,
+ view->orientation,
view->scale,
&width_2, &height_2);
if (width_2 > width) {
ev_page_cache_get_size (view->page_cache,
view->current_page,
+ view->orientation,
view->scale,
&width, &height);
compute_border (view, width, height, &border);
selection = find_selection_for_page (view, page);
ev_page_cache_get_size (view->page_cache,
- page, view->scale,
+ page, view->orientation,
+ view->scale,
&width, &height);
/* Render the document itself */
real_page_area = *page_area;
view->pixbuf_cache = NULL;
}
- if (view->document) {
- ev_page_cache_clear (view->document);
+ if (view->page_cache) {
+ g_object_unref (view->page_cache);
+ view->page_cache = NULL;
}
}
ev_view_set_orientation (EvView *view,
EvOrientation orientation)
{
- ev_document_set_orientation (view->document, orientation);
-
- clear_caches (view);
- setup_caches (view);
+ view->orientation = orientation;
gtk_widget_queue_resize (GTK_WIDGET (view));
}
void
ev_view_rotate_right (EvView *view)
{
- EvOrientation orientation, new_orientation;
+ EvOrientation orientation;
- orientation = ev_document_get_orientation (view->document);
- if (orientation == EV_ORIENTATION_PORTRAIT) {
- new_orientation = EV_ORIENTATION_LANDSCAPE;
- } else if (orientation == EV_ORIENTATION_LANDSCAPE) {
- new_orientation = EV_ORIENTATION_UPSIDEDOWN;
- } else if (orientation == EV_ORIENTATION_UPSIDEDOWN) {
- new_orientation = EV_ORIENTATION_SEASCAPE;
+ if (view->orientation == EV_ORIENTATION_PORTRAIT) {
+ orientation = EV_ORIENTATION_LANDSCAPE;
+ } else if (view->orientation == EV_ORIENTATION_LANDSCAPE) {
+ orientation = EV_ORIENTATION_UPSIDEDOWN;
+ } else if (view->orientation == EV_ORIENTATION_UPSIDEDOWN) {
+ orientation = EV_ORIENTATION_SEASCAPE;
} else {
- new_orientation = EV_ORIENTATION_PORTRAIT;
+ orientation = EV_ORIENTATION_PORTRAIT;
}
- ev_view_set_orientation (view, new_orientation);
+
+ ev_view_set_orientation (view, orientation);
}
void
ev_view_rotate_left (EvView *view)
{
- EvOrientation orientation, new_orientation;
+ EvOrientation orientation;
- orientation = ev_document_get_orientation (view->document);
- if (orientation == EV_ORIENTATION_PORTRAIT) {
- new_orientation = EV_ORIENTATION_SEASCAPE;
- } else if (orientation == EV_ORIENTATION_SEASCAPE) {
- new_orientation = EV_ORIENTATION_UPSIDEDOWN;
- } else if (orientation == EV_ORIENTATION_UPSIDEDOWN) {
- new_orientation = EV_ORIENTATION_LANDSCAPE;
+ if (view->orientation == EV_ORIENTATION_PORTRAIT) {
+ orientation = EV_ORIENTATION_SEASCAPE;
+ } else if (view->orientation == EV_ORIENTATION_SEASCAPE) {
+ orientation = EV_ORIENTATION_UPSIDEDOWN;
+ } else if (view->orientation == EV_ORIENTATION_UPSIDEDOWN) {
+ orientation = EV_ORIENTATION_LANDSCAPE;
} else {
- new_orientation = EV_ORIENTATION_PORTRAIT;
+ orientation = EV_ORIENTATION_PORTRAIT;
}
- ev_view_set_orientation (view, new_orientation);
+
+ ev_view_set_orientation (view, orientation);
}
static double
ev_page_cache_get_size (view->page_cache,
view->current_page,
+ view->orientation,
1.0,
&doc_width,
&doc_height);
/* Find the largest of the two. */
ev_page_cache_get_size (view->page_cache,
view->current_page,
+ view->orientation,
1.0,
&doc_width, &doc_height);
gint width_2, height_2;
ev_page_cache_get_size (view->page_cache,
other_page,
+ view->orientation,
1.0,
&width_2, &height_2);
if (width_2 > doc_width)
ev_page_cache_get_size (view->page_cache,
view->current_page,
+ view->orientation,
1.0,
&doc_width,
&doc_height);
GdkPoint *point;
ev_page_cache_get_size (view->page_cache, i,
+ view->orientation,
1.0, &width, &height);
selection = g_new0 (EvViewSelection, 1);
EvViewSelection *selection;
ev_page_cache_get_size (view->page_cache,
+ view->orientation,
i, 1.0, &width, &height);
selection = g_new0 (EvViewSelection, 1);