Fix of internal compiler failure (MSVC 2019)

This commit is contained in:
Jakub Melka
2021-03-07 19:22:24 +01:00
parent 848e1aee3c
commit fec4f7630b
2 changed files with 54 additions and 16 deletions

View File

@ -24,6 +24,8 @@
#include "pdfconstants.h"
#include "pdfutils.h"
#include <QImage>
namespace pdf
{
@ -140,6 +142,12 @@ public:
explicit PDFFloatBitmap();
explicit PDFFloatBitmap(size_t width, size_t height, PDFPixelFormat format);
PDFFloatBitmap(const PDFFloatBitmap&) = default;
PDFFloatBitmap(PDFFloatBitmap&&) = default;
PDFFloatBitmap& operator=(const PDFFloatBitmap&) = default;
PDFFloatBitmap& operator=(PDFFloatBitmap&&) = default;
/// Returns buffer with pixel channels
PDFColorBuffer getPixel(size_t x, size_t y);
@ -268,6 +276,11 @@ public:
void fillProcessColorChannels(PDFColorComponent value);
void fillChannel(size_t channel, PDFColorComponent value);
/// Creates opaque soft mask of given size
/// \param width Width
/// \param height Height
static PDFFloatBitmap createOpaqueSoftMask(size_t width, size_t height);
private:
PDFPixelFormat m_format;
std::size_t m_width;
@ -613,7 +626,8 @@ public:
/// with paper color \p paperColor.
/// \param use16bit Produce 16-bit image instead of standard 8-bit
/// \param usePaper Blend image with opaque paper, with color \p paperColor
QImage toImage(bool use16Bit, bool usePaper = false, PDFRGB paperColor = PDFRGB()) const;
/// \param paperColor Paper color
QImage toImage(bool use16Bit, bool usePaper, const PDFRGB& paperColor) const;
virtual void performPathPainting(const QPainterPath& path, bool stroke, bool fill, bool text, Qt::FillRule fillRule) override;
virtual bool performPathPaintingUsingShading(const QPainterPath& path, bool stroke, bool fill, const PDFShadingPattern* shadingPattern) override;
@ -796,6 +810,10 @@ private:
/// \param imageData Soft mask data
PDFFloatBitmap getAlphaMaskFromSoftMask(const PDFImageData& softMask);
static void createOpaqueBitmap(PDFFloatBitmap& bitmap);
static void createPaperBitmap(PDFFloatBitmap& bitmap, const PDFRGB& paperColor);
static void createOpaqueSoftMask(PDFFloatBitmap& softMask, size_t width, size_t height) { softMask = PDFFloatBitmap::createOpaqueSoftMask(width, height); }
PDFColorSpacePointer m_deviceColorSpace; ///< Device color space (color space for final result)
PDFColorSpacePointer m_processColorSpace; ///< Process color space (color space, in which is page graphic's blended)
std::unique_ptr<PDFTransparencyGroupGuard> m_pageTransparencyGroupGuard;