diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-06-18 16:55:30 +0200 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2018-06-22 16:48:50 +0100 |
commit | 66a23e616670fe19e966c833ac4c0db5edf57c7c (patch) | |
tree | b682ae17bbc253c13a36b70100d4c548d1f7ac61 /platform/x11/pdfapp.c | |
parent | a69f71e89bc9c325bc91fc0ec69f3ca231c83efe (diff) | |
download | mupdf-66a23e616670fe19e966c833ac4c0db5edf57c7c.tar.xz |
Use fz_quad type in structured text and selection/highlighting.
Diffstat (limited to 'platform/x11/pdfapp.c')
-rw-r--r-- | platform/x11/pdfapp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/x11/pdfapp.c b/platform/x11/pdfapp.c index 1c5ae45d..17af3d0f 100644 --- a/platform/x11/pdfapp.c +++ b/platform/x11/pdfapp.c @@ -1050,7 +1050,7 @@ void pdfapp_inverthit(pdfapp_t *app) for (i = 0; i < app->hit_count; i++) { - bbox = app->hit_bbox[i]; + bbox = fz_rect_from_quad(app->hit_bbox[i]); pdfapp_invert(app, fz_transform_rect(&bbox, &ctm)); } } @@ -1938,10 +1938,11 @@ void pdfapp_oncopy(pdfapp_t *app, unsigned short *ucsbuf, int ucslen) int saw_text = 0; for (ch = line->first_char; ch; ch = ch->next) { + fz_rect bbox = fz_rect_from_quad(ch->quad); int c = ch->c; if (c < 32) c = 0xFFFD; - if (ch->bbox.x1 >= sel.x0 && ch->bbox.x0 <= sel.x1 && ch->bbox.y1 >= sel.y0 && ch->bbox.y0 <= sel.y1) + if (bbox.x1 >= sel.x0 && bbox.x0 <= sel.x1 && bbox.y1 >= sel.y0 && bbox.y0 <= sel.y1) { saw_text = 1; if (need_newline) |