Pattern shading refactoring

This commit is contained in:
Jakub Melka
2019-08-31 15:55:59 +02:00
parent 36a071886b
commit 31eae284c2
7 changed files with 151 additions and 49 deletions

View File

@@ -210,6 +210,7 @@ public:
virtual QColor getColor(const PDFColor& color) const = 0;
virtual size_t getColorComponentCount() const = 0;
virtual QImage getImage(const PDFImageData& imageData) const;
virtual const PDFPattern* getPattern() const { return nullptr; }
/// Checks, if number of color components is OK, and if yes, converts them to the QColor value.
/// If they are not OK, exception is thrown.
@@ -544,7 +545,7 @@ public:
virtual QColor getColor(const PDFColor& color) const override;
virtual size_t getColorComponentCount() const override;
const PDFPattern* getPattern() const { return m_pattern.get(); }
virtual const PDFPattern* getPattern() const override { return m_pattern.get(); }
private:
std::shared_ptr<PDFPattern> m_pattern;