mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Precompiled pages
This commit is contained in:
@ -27,6 +27,7 @@ class QPainter;
|
||||
namespace pdf
|
||||
{
|
||||
class PDFFontCache;
|
||||
class PDFPrecompiledPage;
|
||||
class PDFOptionalContentActivity;
|
||||
|
||||
/// Renders the PDF page on the painter, or onto an image.
|
||||
@ -60,6 +61,19 @@ public:
|
||||
/// Rendering errors are reported and returned in the error list. If no error occured, empty list is returned.
|
||||
QList<PDFRenderError> render(QPainter* painter, const QMatrix& matrix, size_t pageIndex) const;
|
||||
|
||||
/// Compiles page (i.e. prepares compiled page). \p page should be empty page, onto which
|
||||
/// are graphics commands written. No exception is thrown. Rendering errors are reported and written
|
||||
/// to the compiled page.
|
||||
/// \param precompiledPage Precompiled page pointer
|
||||
/// \param pageIndex Index of page to be compiled
|
||||
void compile(PDFPrecompiledPage* precompiledPage, size_t pageIndex) const;
|
||||
|
||||
/// Creates page point to device point matrix for the given rectangle. It creates transformation
|
||||
/// from page's media box to the target rectangle.
|
||||
/// \param page Page, for which we want to create matrix
|
||||
/// \param rectangle Page rectangle, to which is page media box transformed
|
||||
QMatrix createPagePointToDevicePointMatrix(const PDFPage* page, const QRectF& rectangle) const;
|
||||
|
||||
/// Returns default renderer features
|
||||
static constexpr Features getDefaultFeatures() { return Antialiasing | TextAntialiasing | ClipToCropBox; }
|
||||
|
||||
@ -71,7 +85,6 @@ private:
|
||||
PDFMeshQualitySettings m_meshQualitySettings;
|
||||
};
|
||||
|
||||
|
||||
} // namespace pdf
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(pdf::PDFRenderer::Features)
|
||||
|
Reference in New Issue
Block a user