DocPage Organizer: create document manipulator

This commit is contained in:
Jakub Melka
2021-07-18 17:58:12 +02:00
parent 83eb35e1c0
commit f7d7902aa9
8 changed files with 608 additions and 12 deletions

View File

@@ -120,6 +120,7 @@ struct PDFTranslationContext
constexpr PDFReal PDF_POINT_TO_INCH = 1.0 / 72.0;
constexpr PDFReal PDF_INCH_TO_MM = 25.4; // [mm / inch]
constexpr PDFReal PDF_POINT_TO_MM = PDF_POINT_TO_INCH * PDF_INCH_TO_MM;
constexpr PDFReal PDF_MM_TO_POINT = 1.0 / PDF_POINT_TO_MM;
/// This is default "DPI", but in milimeters, so the name is DPMM (device pixel per milimeter)
constexpr PDFReal PDF_DEFAULT_DPMM = 96.0 / PDF_INCH_TO_MM;
@@ -129,6 +130,11 @@ constexpr PDFReal convertPDFPointToMM(PDFReal point)
return point * PDF_POINT_TO_MM;
}
constexpr PDFReal convertMMToPDFPoint(PDFReal point)
{
return point * PDF_MM_TO_POINT;
}
class PDFBoolGuard final
{
public: