X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=backend%2Fev-document.c;h=a800866f8b087d14f456c2aa2885462b86bc63d7;hb=a24ba773afb595b2be95a01702816aa66f50ac54;hp=9bccc4cab7ee2d09ed99e5024ac3144a6cea4456;hpb=e9ffd7b5401b32979ea83bc56da4592e80f8ce3e;p=evince.git diff --git a/backend/ev-document.c b/backend/ev-document.c index 9bccc4ca..a800866f 100644 --- a/backend/ev-document.c +++ b/backend/ev-document.c @@ -203,9 +203,8 @@ ev_document_get_links (EvDocument *document, GdkPixbuf * -ev_document_render_pixbuf (EvDocument *document, - int page, - double scale) +ev_document_render_pixbuf (EvDocument *document, + EvRenderContext *rc) { EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document); GdkPixbuf *retval; @@ -213,28 +212,11 @@ ev_document_render_pixbuf (EvDocument *document, LOG ("ev_document_render_pixbuf"); g_assert (iface->render_pixbuf); - retval = iface->render_pixbuf (document, page, scale); + retval = iface->render_pixbuf (document, rc); return retval; } -EvOrientation -ev_document_get_orientation (EvDocument *document) -{ - EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document); - - return iface->get_orientation (document); -} - -void -ev_document_set_orientation (EvDocument *document, - EvOrientation orientation) -{ - EvDocumentIface *iface = EV_DOCUMENT_GET_IFACE (document); - - iface->set_orientation (document, orientation); -} - void ev_document_info_free (EvDocumentInfo *info) { @@ -250,3 +232,22 @@ ev_document_info_free (EvDocumentInfo *info) g_free (info); } + + +/* Compares two rects. returns 0 if they're equal */ +#define EPSILON 0.0000001 + +gint +ev_rect_cmp (EvRectangle *a, + EvRectangle *b) +{ + if (a == b) + return 0; + if (a == NULL || b == NULL) + return 1; + + return ! ((ABS (a->x1 - b->x1) < EPSILON) && + (ABS (a->y1 - b->y1) < EPSILON) && + (ABS (a->x2 - b->x2) < EPSILON) && + (ABS (a->y2 - b->y2) < EPSILON)); +}