From 66a23e616670fe19e966c833ac4c0db5edf57c7c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 18 Jun 2018 16:55:30 +0200 Subject: Use fz_quad type in structured text and selection/highlighting. --- source/pdf/pdf-annot.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source/pdf/pdf-annot.c') diff --git a/source/pdf/pdf-annot.c b/source/pdf/pdf-annot.c index ba92b7ef..cf072c60 100644 --- a/source/pdf/pdf-annot.c +++ b/source/pdf/pdf-annot.c @@ -1058,7 +1058,7 @@ pdf_clear_annot_quad_points(fz_context *ctx, pdf_annot *annot) } void -pdf_add_annot_quad_point(fz_context *ctx, pdf_annot *annot, fz_rect bbox) +pdf_add_annot_quad_point(fz_context *ctx, pdf_annot *annot, fz_quad quad) { pdf_document *doc = annot->page->doc; fz_matrix page_ctm, inv_page_ctm; @@ -1080,15 +1080,15 @@ pdf_add_annot_quad_point(fz_context *ctx, pdf_annot *annot, fz_rect bbox) * in a counterclockwise fashion. Experiments with Adobe's implementation * indicates a cross-wise ordering is intended: ul, ur, ll, lr. */ - fz_transform_rect(&bbox, &inv_page_ctm); - pdf_array_push_real(ctx, quad_points, bbox.x0); /* ul */ - pdf_array_push_real(ctx, quad_points, bbox.y1); - pdf_array_push_real(ctx, quad_points, bbox.x1); /* ur */ - pdf_array_push_real(ctx, quad_points, bbox.y1); - pdf_array_push_real(ctx, quad_points, bbox.x0); /* ll */ - pdf_array_push_real(ctx, quad_points, bbox.y0); - pdf_array_push_real(ctx, quad_points, bbox.x1); /* lr */ - pdf_array_push_real(ctx, quad_points, bbox.y0); + fz_transform_quad(&quad, &inv_page_ctm); + pdf_array_push_real(ctx, quad_points, quad.ul.x); + pdf_array_push_real(ctx, quad_points, quad.ul.y); + pdf_array_push_real(ctx, quad_points, quad.ur.x); + pdf_array_push_real(ctx, quad_points, quad.ur.y); + pdf_array_push_real(ctx, quad_points, quad.ll.x); + pdf_array_push_real(ctx, quad_points, quad.ll.y); + pdf_array_push_real(ctx, quad_points, quad.lr.x); + pdf_array_push_real(ctx, quad_points, quad.lr.y); pdf_dirty_annot(ctx, annot); } -- cgit v1.2.3