#include <MRPdf.h>
Classes | |
struct | ImageParams |
Parameters to adding image from file. More... | |
struct | PaletteRowStats |
Public Member Functions | |
MRIOEXTRAS_API | Pdf (const std::filesystem::path &documentPath, const PdfParameters ¶ms=PdfParameters()) |
Ctor. | |
MRIOEXTRAS_API | Pdf (Pdf &&other) noexcept |
MRIOEXTRAS_API Pdf & | operator= (Pdf other) noexcept |
MRIOEXTRAS_API | ~Pdf () |
Dtor. Automatically do close. | |
MRIOEXTRAS_API void | addText (const std::string &text, bool isTitle=false) |
MRIOEXTRAS_API void | addTable (const std::vector< std::pair< std::string, float > > &table) |
MRIOEXTRAS_API void | addPaletteStatsTable (const std::vector< PaletteRowStats > &paletteStats) |
MRIOEXTRAS_API void | addImageFromFile (const std::filesystem::path &imagePath, const ImageParams ¶ms) |
Add image from file in current cursor position. If image bigger than page size, autoscale image to page size. Move cursor. | |
MRIOEXTRAS_API void | newPage () |
Add new pageand move cursor on it. | |
MRIOEXTRAS_API void | close () |
Save and close document. After this impossible add anything in document. | |
void | setCursorPosX (float posX) |
void | setCursorPosY (float posY) |
float | getCursorPosX () const |
float | getCursorPosY () const |
MRIOEXTRAS_API Vector2f | getPageSize () const |
MRIOEXTRAS_API Box2f | getPageWorkArea () const |
MRIOEXTRAS_API | operator bool () const |
Checking the ability to work with a document. | |
Class for simple creation pdf.
MRIOEXTRAS_API MR::Pdf::Pdf | ( | const std::filesystem::path & | documentPath, |
const PdfParameters & | params = PdfParameters() ) |
Ctor.
|
noexcept |
MRIOEXTRAS_API MR::Pdf::~Pdf | ( | ) |
Dtor. Automatically do close.
MRIOEXTRAS_API void MR::Pdf::addImageFromFile | ( | const std::filesystem::path & | imagePath, |
const ImageParams & | params ) |
Add image from file in current cursor position. If image bigger than page size, autoscale image to page size. Move cursor.
MRIOEXTRAS_API void MR::Pdf::addPaletteStatsTable | ( | const std::vector< PaletteRowStats > & | paletteStats | ) |
MRIOEXTRAS_API void MR::Pdf::addTable | ( | const std::vector< std::pair< std::string, float > > & | table | ) |
MRIOEXTRAS_API void MR::Pdf::addText | ( | const std::string & | text, |
bool | isTitle = false ) |
MRIOEXTRAS_API void MR::Pdf::close | ( | ) |
Save and close document. After this impossible add anything in document.
|
inline |
|
inline |
MRIOEXTRAS_API Vector2f MR::Pdf::getPageSize | ( | ) | const |
MRIOEXTRAS_API Box2f MR::Pdf::getPageWorkArea | ( | ) | const |
MRIOEXTRAS_API void MR::Pdf::newPage | ( | ) |
Add new pageand move cursor on it.
MRIOEXTRAS_API MR::Pdf::operator bool | ( | ) | const |
Checking the ability to work with a document.
|
inline |
|
inline |