mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Bugfix: cmyk over spot color
This commit is contained in:
@ -148,6 +148,11 @@ void PDFFloatBitmap::setAllColorActive()
|
|||||||
std::fill(m_activeColorMask.begin(), m_activeColorMask.end(), PDFPixelFormat::getAllColorsMask());
|
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
|
PDFFloatBitmap PDFFloatBitmap::extractProcessColors() const
|
||||||
{
|
{
|
||||||
PDFPixelFormat format = PDFPixelFormat::createFormat(m_format.getProcessColorChannelCount(), 0, false, m_format.hasProcessColorsSubtractive(), false);
|
PDFPixelFormat format = PDFPixelFormat::createFormat(m_format.getProcessColorChannelCount(), 0, false, m_format.hasProcessColorsSubtractive(), false);
|
||||||
@ -363,6 +368,12 @@ void PDFFloatBitmap::blend(const PDFFloatBitmap& source,
|
|||||||
continue;
|
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);
|
std::fill(B_i.begin(), B_i.end(), 0.0f);
|
||||||
|
|
||||||
// Calculate blended pixel
|
// Calculate blended pixel
|
||||||
@ -2289,6 +2300,7 @@ void PDFTransparencyRenderer::PDFTransparencyGroupPainterData::makeInitialBackdr
|
|||||||
void PDFTransparencyRenderer::PDFTransparencyGroupPainterData::makeImmediateBackdropTransparent()
|
void PDFTransparencyRenderer::PDFTransparencyGroupPainterData::makeImmediateBackdropTransparent()
|
||||||
{
|
{
|
||||||
immediateBackdrop.makeTransparent();
|
immediateBackdrop.makeTransparent();
|
||||||
|
immediateBackdrop.setAllColorInactive();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PDFTransparencyRenderer::PDFTransparencyGroupPainterData::makeSoftMaskOpaque()
|
void PDFTransparencyRenderer::PDFTransparencyGroupPainterData::makeSoftMaskOpaque()
|
||||||
|
@ -205,6 +205,9 @@ public:
|
|||||||
/// Sets all colors as active
|
/// Sets all colors as active
|
||||||
void setAllColorActive();
|
void setAllColorActive();
|
||||||
|
|
||||||
|
/// Sets all colors as inactive
|
||||||
|
void setAllColorInactive();
|
||||||
|
|
||||||
/// Extract process colors into another bitmap
|
/// Extract process colors into another bitmap
|
||||||
PDFFloatBitmap extractProcessColors() const;
|
PDFFloatBitmap extractProcessColors() const;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user