mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Some bugfixing
This commit is contained in:
@ -219,7 +219,10 @@ QImage PDFRasterizer::render(const PDFPage* page, const PDFPrecompiledPage* comp
|
|||||||
Q_ASSERT(m_fbo);
|
Q_ASSERT(m_fbo);
|
||||||
if (m_fbo->isValid() && m_fbo->bind())
|
if (m_fbo->isValid() && m_fbo->bind())
|
||||||
{
|
{
|
||||||
// Now, we have bind the buffer.
|
// Now, we have bind the buffer. Due to bug in Qt's OpenGL drawing subsystem,
|
||||||
|
// we must render it two times, otherwise painter paths will be sometimes
|
||||||
|
// replaced by filled rectangles.
|
||||||
|
for (int i = 0; i < 2; ++i)
|
||||||
{
|
{
|
||||||
QOpenGLPaintDevice device(size);
|
QOpenGLPaintDevice device(size);
|
||||||
QPainter painter(&device);
|
QPainter painter(&device);
|
||||||
|
@ -48,6 +48,8 @@ PDFRenderToImagesDialog::PDFRenderToImagesDialog(const pdf::PDFDocument* documen
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
qRegisterMetaType<pdf::PDFRenderError>("PDFRenderError");
|
||||||
|
|
||||||
// Load image formats
|
// Load image formats
|
||||||
for (const QByteArray& format : m_imageWriterSettings.getFormats())
|
for (const QByteArray& format : m_imageWriterSettings.getFormats())
|
||||||
{
|
{
|
||||||
|
@ -96,4 +96,6 @@ private:
|
|||||||
|
|
||||||
} // namespace pdfviewer
|
} // namespace pdfviewer
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(pdf::PDFRenderError)
|
||||||
|
|
||||||
#endif // PDFRENDERTOIMAGESDIALOG_H
|
#endif // PDFRENDERTOIMAGESDIALOG_H
|
||||||
|
Reference in New Issue
Block a user