summaryrefslogtreecommitdiff
path: root/src/cairo-tag-attributes-private.h
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2017-08-26 09:58:48 +0930
committerAdrian Johnson <ajohnson@redneon.com>2017-08-26 16:26:12 +0930
commitdf37baf7895ef9acc71f3627b22e7368c8af3ea1 (patch)
tree31a859c66d5b9ab393599d261900012c470cbf9d /src/cairo-tag-attributes-private.h
parent74c6e3ae1d356e8bb4c7043cb9d3897c45cc0f79 (diff)
downloadcairo-df37baf7895ef9acc71f3627b22e7368c8af3ea1.tar.gz
pdf: fix link positions
Converting the link position from cairo to pdf coordinates requires the page height. Since the link may point to a different page, build an array of the height of each page and use the target page height for the conversion. Don't default to a [0,0] position if "pos" is not specified. PDF allows a null destination position to be specified which means don't change the position if the page is already displayed or show top left if switching to a different page. This is more useful default particularly for external files where the coordinates (which must be in PDF coordinates as we don't know the page height) of the top left corner may not be known.
Diffstat (limited to 'src/cairo-tag-attributes-private.h')
-rw-r--r--src/cairo-tag-attributes-private.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cairo-tag-attributes-private.h b/src/cairo-tag-attributes-private.h
index 0af23dc45..a127abc97 100644
--- a/src/cairo-tag-attributes-private.h
+++ b/src/cairo-tag-attributes-private.h
@@ -55,6 +55,7 @@ typedef struct _cairo_link_attrs {
char *uri;
char *file;
int page;
+ cairo_bool_t has_pos;
cairo_point_double_t pos;
} cairo_link_attrs_t;