diff options
-rw-r--r-- | include/vcl/filter/PDFiumLibrary.hxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/ipdf/pdfread.cxx | 3 | ||||
-rw-r--r-- | vcl/source/pdf/PDFiumLibrary.cxx | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/include/vcl/filter/PDFiumLibrary.hxx b/include/vcl/filter/PDFiumLibrary.hxx index 1900c07d8e8c..556ca44ac4fd 100644 --- a/include/vcl/filter/PDFiumLibrary.hxx +++ b/include/vcl/filter/PDFiumLibrary.hxx @@ -219,6 +219,8 @@ public: double getWidth(); double getHeight(); + + bool hasTransparency(); }; class VCL_DLLPUBLIC PDFiumDocument final diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx index f4ed0acf5b43..bb9b91e97702 100644 --- a/vcl/source/filter/ipdf/pdfread.cxx +++ b/vcl/source/filter/ipdf/pdfread.cxx @@ -171,8 +171,7 @@ size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector<Bitmap>& rBi if (!pPdfBitmap) break; - const FPDF_DWORD nColor - = FPDFPage_HasTransparency(pPdfPage->getPointer()) ? 0x00000000 : 0xFFFFFFFF; + const FPDF_DWORD nColor = pPdfPage->hasTransparency() ? 0x00000000 : 0xFFFFFFFF; FPDFBitmap_FillRect(pPdfBitmap->getPointer(), 0, 0, nPageWidth, nPageHeight, nColor); FPDF_RenderPageBitmap(pPdfBitmap->getPointer(), pPdfPage->getPointer(), /*start_x=*/0, /*start_y=*/0, nPageWidth, nPageHeight, /*rotate=*/0, /*flags=*/0); diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx index 10fa42f143cf..fa5baeebb0c3 100644 --- a/vcl/source/pdf/PDFiumLibrary.cxx +++ b/vcl/source/pdf/PDFiumLibrary.cxx @@ -463,6 +463,8 @@ double PDFiumPage::getWidth() { return FPDF_GetPageWidth(mpPage); } double PDFiumPage::getHeight() { return FPDF_GetPageHeight(mpPage); } +bool PDFiumPage::hasTransparency() { return FPDFPage_HasTransparency(mpPage); } + PDFiumPathSegment::PDFiumPathSegment(FPDF_PATHSEGMENT pPathSegment) : mpPathSegment(pPathSegment) { |