#ifndef PAPER_SIZE_H #define PAPER_SIZE_H #include #if defined(WIN32) || defined(_WIN64) #include #endif #include "common_setting.h" #ifdef __linux__ typedef CSSIZE Size; typedef CSSIZE SIZE; #endif typedef struct Paper_Status { unsigned int Paper; unsigned int Orentate; friend bool operator<(const struct Paper_Status& a, const struct Paper_Status& b) { if (a.Paper < b.Paper || (a.Paper == b.Paper && a.Orentate < b.Orentate)) { return true; } return false; } }PaperStatus; namespace Device { class PaperSize { public: PaperSize(int pid); private: void InitPaperMap(); std::map papersize; std::map, SIZE> dpiDct; std::map dpiDct_100; std::map dpiDct_400; std::map dpiDct_300; int pid_; public: SIZE GetPaperSize(DWORD paperType, float dpi, int orentation); }; } #endif