diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-10-27 21:04:04 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-10-28 08:36:45 +0100 |
commit | 2beecc277959051026d7d1303e3c3ad7922c326c (patch) | |
tree | 21ac87de85a528f77600263300b3a043653ec413 /vcl/source | |
parent | 40fa3a61ac7dbe2ba73b5ee71bb85cc3bb4a27af (diff) |
pdfium: add an FPDFBitmap_FillRect() wrapper
Change-Id: I4201a9ead756cf814c8452ef504acd054c4fe38b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104908
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/filter/ipdf/pdfread.cxx | 4 | ||||
-rw-r--r-- | vcl/source/pdf/PDFiumLibrary.cxx | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx index f9d367002f2e..3e0207e86bd5 100644 --- a/vcl/source/filter/ipdf/pdfread.cxx +++ b/vcl/source/filter/ipdf/pdfread.cxx @@ -178,8 +178,8 @@ size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector<BitmapEx>& r // the PDF is not transparent. bTransparent = true; } - const FPDF_DWORD nColor = bTransparent ? 0x00000000 : 0xFFFFFFFF; - FPDFBitmap_FillRect(pPdfBitmap->getPointer(), 0, 0, nPageWidth, nPageHeight, nColor); + const sal_uInt32 nColor = bTransparent ? 0x00000000 : 0xFFFFFFFF; + pPdfBitmap->fillRect(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 fa5baeebb0c3..607ad7ab9d2c 100644 --- a/vcl/source/pdf/PDFiumLibrary.cxx +++ b/vcl/source/pdf/PDFiumLibrary.cxx @@ -498,6 +498,11 @@ PDFiumBitmap::~PDFiumBitmap() } } +void PDFiumBitmap::fillRect(int left, int top, int width, int height, sal_uInt32 nColor) +{ + FPDFBitmap_FillRect(mpBitmap, left, top, width, height, nColor); +} + PDFiumAnnotation::PDFiumAnnotation(FPDF_ANNOTATION pAnnotation) : mpAnnotation(pAnnotation) { |