mirror of https://github.com/JakubMelka/PDF4QT.git
Bugfix: cmyk over spot color
This commit is contained in:
parent
63218a40dd
commit
114dfcb895
|
@ -148,6 +148,11 @@ void PDFFloatBitmap::setAllColorActive()
|
|||
std::fill(m_activeColorMask.begin(), m_activeColorMask.end(), PDFPixelFormat::getAllColorsMask());
|
||||
}
|
||||
|
||||
void PDFFloatBitmap::setAllColorInactive()
|
||||
{
|
||||
std::fill(m_activeColorMask.begin(), m_activeColorMask.end(), 0);
|
||||
}
|
||||
|
||||
PDFFloatBitmap PDFFloatBitmap::extractProcessColors() const
|
||||
{
|
||||
PDFPixelFormat format = PDFPixelFormat::createFormat(m_format.getProcessColorChannelCount(), 0, false, m_format.hasProcessColorsSubtractive(), false);
|
||||
|
@ -363,6 +368,12 @@ void PDFFloatBitmap::blend(const PDFFloatBitmap& source,
|
|||
continue;
|
||||
}
|
||||
|
||||
if (target.hasActiveColorMask())
|
||||
{
|
||||
const uint32_t activeColorChannels = source.hasActiveColorMask() ? source.getPixelActiveColorMask(x, y) : PDFPixelFormat::getAllColorsMask();
|
||||
target.markPixelActiveColorMask(x, y, activeColorChannels);
|
||||
}
|
||||
|
||||
std::fill(B_i.begin(), B_i.end(), 0.0f);
|
||||
|
||||
// Calculate blended pixel
|
||||
|
@ -2289,6 +2300,7 @@ void PDFTransparencyRenderer::PDFTransparencyGroupPainterData::makeInitialBackdr
|
|||
void PDFTransparencyRenderer::PDFTransparencyGroupPainterData::makeImmediateBackdropTransparent()
|
||||
{
|
||||
immediateBackdrop.makeTransparent();
|
||||
immediateBackdrop.setAllColorInactive();
|
||||
}
|
||||
|
||||
void PDFTransparencyRenderer::PDFTransparencyGroupPainterData::makeSoftMaskOpaque()
|
||||
|
|
|
@ -205,6 +205,9 @@ public:
|
|||
/// Sets all colors as active
|
||||
void setAllColorActive();
|
||||
|
||||
/// Sets all colors as inactive
|
||||
void setAllColorInactive();
|
||||
|
||||
/// Extract process colors into another bitmap
|
||||
PDFFloatBitmap extractProcessColors() const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue