summaryrefslogtreecommitdiff
path: root/platform/gl/gl-annotate.c
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/gl/gl-annotate.c
parenta69f71e89bc9c325bc91fc0ec69f3ca231c83efe (diff)
downloadmupdf-66a23e616670fe19e966c833ac4c0db5edf57c7c.tar.xz
Use fz_quad type in structured text and selection/highlighting.
Diffstat (limited to 'platform/gl/gl-annotate.c')
-rw-r--r--platform/gl/gl-annotate.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/platform/gl/gl-annotate.c b/platform/gl/gl-annotate.c
index 9d88dabc..873612c7 100644
--- a/platform/gl/gl-annotate.c
+++ b/platform/gl/gl-annotate.c
@@ -1040,7 +1040,7 @@ static void do_edit_quad_points(void)
{
static fz_point pt = { 0, 0 };
static int marking = 0;
- fz_rect hits[1000];
+ fz_quad hits[1000];
int i, n;
if (ui_mouse_inside(&view_page_area))
@@ -1071,12 +1071,17 @@ static void do_edit_quad_points(void)
glEnable(GL_BLEND);
glColor4f(1, 1, 1, 1);
+ glBegin(GL_QUADS);
for (i = 0; i < n; ++i)
{
- fz_rect thit = hits[i];
- fz_transform_rect(&thit, &view_page_ctm);
- glRectf(thit.x0, thit.y0, thit.x1 + 1, thit.y1 + 1);
+ fz_quad thit = hits[i];
+ fz_transform_quad(&thit, &view_page_ctm);
+ glVertex2f(thit.ul.x, thit.ul.y);
+ glVertex2f(thit.ur.x, thit.ur.y);
+ glVertex2f(thit.lr.x, thit.lr.y);
+ glVertex2f(thit.ll.x, thit.ll.y);
}
+ glEnd();
glDisable(GL_BLEND);