summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2018-06-18 16:55:30 +0200
committerRobin Watts <robin.watts@artifex.com>2018-06-22 16:48:50 +0100
commit66a23e616670fe19e966c833ac4c0db5edf57c7c (patch)
treeb682ae17bbc253c13a36b70100d4c548d1f7ac61 /platform/x11
parenta69f71e89bc9c325bc91fc0ec69f3ca231c83efe (diff)
downloadmupdf-66a23e616670fe19e966c833ac4c0db5edf57c7c.tar.xz
Use fz_quad type in structured text and selection/highlighting.
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/pdfapp.c5
-rw-r--r--platform/x11/pdfapp.h2
2 files changed, 4 insertions, 3 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)
diff --git a/platform/x11/pdfapp.h b/platform/x11/pdfapp.h
index b6c2127c..0315bfd0 100644
--- a/platform/x11/pdfapp.h
+++ b/platform/x11/pdfapp.h
@@ -131,7 +131,7 @@ struct pdfapp_s
int searchdir;
char search[512];
int searchpage;
- fz_rect hit_bbox[512];
+ fz_quad hit_bbox[512];
int hit_count;
/* client context storage */