[librsvg: 8/35] PdfPredicate::with_page_size - Don't take a DPI value
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 8/35] PdfPredicate::with_page_size - Don't take a DPI value
- Date: Thu, 17 Jun 2021 19:31:37 +0000 (UTC)
commit dced738b22b9d82e5eacfd6a08f03f1d1efba5b2
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Jun 11 15:46:42 2021 -0500
PdfPredicate::with_page_size - Don't take a DPI value
Always expect the PDF's UserUnit to be 1.0 - as far as I can tell, we
shouldn't be generating PDFs with any other value.
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/547>
tests/src/cmdline/rsvg_convert.rs | 2 +-
tests/src/predicates/pdf.rs | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/tests/src/cmdline/rsvg_convert.rs b/tests/src/cmdline/rsvg_convert.rs
index ab35709e..417d8666 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -538,7 +538,7 @@ fn pdf_page_size() {
.success()
// TODO: the PDF size and resolution is actually a bug in rsvg-convert,
// see https://gitlab.gnome.org/GNOME/librsvg/issues/514
- .stdout(file::is_pdf().with_page_size(200, 100, 72.0));
+ .stdout(file::is_pdf().with_page_size(200, 100));
}
#[test]
diff --git a/tests/src/predicates/pdf.rs b/tests/src/predicates/pdf.rs
index d514652b..5f364dc9 100644
--- a/tests/src/predicates/pdf.rs
+++ b/tests/src/predicates/pdf.rs
@@ -19,13 +19,13 @@ impl PdfPredicate {
}
}
- pub fn with_page_size(self: Self, width: i64, height: i64, dpi: f64) -> DetailPredicate<Self> {
+ pub fn with_page_size(self: Self, width: i64, height: i64) -> DetailPredicate<Self> {
DetailPredicate::<Self> {
p: self,
d: Detail::PageSize(Dimensions {
w: width,
h: height,
- unit: dpi / 72.0,
+ unit: 1.0,
}),
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]