summaryrefslogtreecommitdiff
path: root/src/export
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-05-27 14:33:00 +0200
committerLaurenz <laurmaedje@gmail.com>2022-05-27 14:34:27 +0200
commitf8009b5b59660b8252bd3ee2cedfd234a1c30cb1 (patch)
tree1039e298423f017344e3c9369c2872c82168f6ba /src/export
parent736289b064c53c215249aad70b3a6a96e79b6021 (diff)
Reuse location type
Diffstat (limited to 'src/export')
-rw-r--r--src/export/pdf.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/export/pdf.rs b/src/export/pdf.rs
index 5e8896f7..c050bfc5 100644
--- a/src/export/pdf.rs
+++ b/src/export/pdf.rs
@@ -333,14 +333,14 @@ impl<'a> PdfExporter<'a> {
.action_type(ActionType::Uri)
.uri(Str(uri.as_str().as_bytes()));
}
- Destination::Internal(page, point) => {
- let page = page - 1;
- let height = page_heights[page];
+ Destination::Internal(loc) => {
+ let index = loc.page - 1;
+ let height = page_heights[index];
link.action()
.action_type(ActionType::GoTo)
.destination_direct()
- .page(page_refs[page])
- .xyz(point.x.to_f32(), height - point.y.to_f32(), None);
+ .page(page_refs[index])
+ .xyz(loc.pos.x.to_f32(), height - loc.pos.y.to_f32(), None);
}
}
}