X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=inline;f=backend%2Fev-document-misc.c;h=4145b8a3687cbb224c3aa3cfe3919da8abf20f2d;hb=5a6c7a5d16f693a626f8d4dfb7b39e541031d965;hp=d7d4beb9285aad0b209b058e4b86d6e5d92777b0;hpb=2aadab6feb778de1be1a92f20ba60e44de571199;p=evince.git diff --git a/backend/ev-document-misc.c b/backend/ev-document-misc.c index d7d4beb9..4145b8a3 100644 --- a/backend/ev-document-misc.c +++ b/backend/ev-document-misc.c @@ -1,6 +1,7 @@ #include "ev-document-misc.h" #include +#include /* Returns a new GdkPixbuf that is suitable for placing in the thumbnail view. * It is four pixels wider and taller than the source. If source_pixbuf is not @@ -62,3 +63,31 @@ ev_document_misc_get_thumbnail_frame (int width, return retval; } + +void +ev_document_misc_get_page_border_size (gint page_width, + gint page_height, + gint *left_border, + gint *right_border, + gint *top_border, + gint *bottom_border) +{ + g_assert (left_border); + g_assert (right_border); + g_assert (top_border); + g_assert (bottom_border); + + *left_border = 1; + *top_border = 1; + if (page_width < 100) { + *right_border = 2; + *bottom_border = 2; + } else if (page_width < 500) { + *right_border = 3; + *left_border = 3; + } else { + *right_border = 4; + *bottom_border = 4; + } +} +