From fb3aec4bf800e3a0241a22a8a5acd61b4fef3395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Zi=C4=85bek?= Date: Fri, 9 Apr 2021 19:17:36 +0200 Subject: [PATCH] PageSize names refactorization --- QuestPDF/Helpers/PageSizes.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/QuestPDF/Helpers/PageSizes.cs b/QuestPDF/Helpers/PageSizes.cs index a63073c..3fe0262 100644 --- a/QuestPDF/Helpers/PageSizes.cs +++ b/QuestPDF/Helpers/PageSizes.cs @@ -47,15 +47,18 @@ namespace QuestPDF.Helpers public static Size Legal => new PageSize(612.4f, 1009.3f); public static Size Letter => new PageSize(612.4f, 791); - public static Size ARCHA => new PageSize(649.2f, 864.7f); - public static Size ARCHB => new PageSize(864.7f, 1295.6f); - public static Size ARCHC => new PageSize(1295.6f, 1729.3f); - public static Size ARCHD => new PageSize(1729.3f, 2591.2f); - public static Size ARCHE => new PageSize(2591.2f, 3455.9f); + public static Size ARCH_A => new PageSize(649.2f, 864.7f); + public static Size ARCH_B => new PageSize(864.7f, 1295.6f); + public static Size ARCH_C => new PageSize(1295.6f, 1729.3f); + public static Size ARCH_D => new PageSize(1729.3f, 2591.2f); + public static Size ARCH_E => new PageSize(2591.2f, 3455.9f); public static Size ARCH_E1 => new PageSize(2160.3f, 3024.9f); public static Size ARCH_E2 => new PageSize(1871.1f, 2735.8f); public static Size ARCH_E3 => new PageSize(1944.8f, 2809.5f); + } + public static class PageSizeExtensions + { public static PageSize Portrait(this Size size) { return new PageSize(Math.Min(size.Width, size.Height), Math.Max(size.Width, size.Height));