Refactoring of colors, introducing original color

This commit is contained in:
Jakub Melka
2021-02-02 19:23:51 +01:00
parent 3a2fa64ac0
commit 975bdba6f6
6 changed files with 132 additions and 50 deletions

View File

@@ -326,6 +326,12 @@ public:
private:
PDFReal getShapeStroking() const;
PDFReal getOpacityStroking() const;
PDFReal getShapeFilling() const;
PDFReal getOpacityFilling() const;
struct PDFTransparencyGroupPainterData
{
PDFTransparencyGroup group;
@@ -341,6 +347,11 @@ private:
PDFColorSpacePointer blendColorSpace;
};
struct PDFTransparencyPainterState
{
QPainterPath clipPath; ///< Clipping path in device state coordinates
};
void removeInitialBackdrop();
PDFFloatBitmapWithColorSpace* getInitialBackdrop();
@@ -348,6 +359,8 @@ private:
PDFFloatBitmapWithColorSpace* getBackdrop();
const PDFColorSpacePointer& getBlendColorSpace() const;
PDFTransparencyPainterState* getPainterState() { return &m_painterStateStack.top(); }
bool isTransparencyGroupIsolated() const;
bool isTransparencyGroupKnockout() const;
@@ -355,6 +368,7 @@ private:
PDFColorSpacePointer m_processColorSpace; ///< Process color space (color space, in which is page graphic's blended)
std::unique_ptr<PDFTransparencyGroupGuard> m_pageTransparencyGroupGuard;
std::vector<PDFTransparencyGroupPainterData> m_transparencyGroupDataStack;
std::stack<PDFTransparencyPainterState> m_painterStateStack;
const PDFInkMapper* m_inkMapper;
bool m_active;
};