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

@ -29,6 +29,7 @@
namespace pdf
{
class PDFPattern;
class PDFShadingPattern;
using PDFPatternPtr = std::shared_ptr<PDFPattern>;
@ -140,6 +141,7 @@ public:
virtual ~PDFPattern() = default;
virtual PatternType getType() const = 0;
virtual const PDFShadingPattern* getShadingPattern() const = 0;
/// Returns bounding box in the shadings target coordinate system (not in
/// pattern coordinate system).
@ -182,8 +184,11 @@ public:
virtual PatternType getType() const override;
virtual ShadingType getShadingType() const = 0;
virtual const PDFShadingPattern* getShadingPattern() const override { return this; }
/// Creates a colored mesh using settings
/// Creates a colored mesh using settings. Mesh is generated in device space
/// coordinate system. You must transform the mesh, if you want to
/// use it in another coordiante system.
/// \param settings Meshing settings
virtual PDFMesh createMesh(const PDFMeshQualitySettings& settings) const = 0;