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

@ -34,6 +34,7 @@
namespace pdf
{
class PDFMesh;
class PDFOptionalContentActivity;
static constexpr const char* PDF_RESOURCE_EXTGSTATE = "ExtGState";
@ -366,6 +367,12 @@ protected:
/// \param image Image to be painted
virtual void performImagePainting(const QImage& image);
/// This function has to be implemented in the client drawing implementation, it should
/// draw the mesh. Mesh is in device space coordinates (so world transformation matrix
/// is identity matrix).
/// \param mesh Mesh to be drawn
virtual void performMeshPainting(const PDFMesh& mesh);
/// This function has to be implemented in the client drawing implementation, it should
/// update the device according to the graphic state change. The flags are set when
/// the value differs from the previous graphic state.
@ -449,6 +456,14 @@ private:
/// \param content Content stream of the form
void processForm(const QMatrix& matrix, const QRectF& boundingBox, const PDFObject& resources, const QByteArray& content);
/// Performs path painting
/// \param path Path, which should be drawn (can be emtpy - in that case nothing happens)
/// \param stroke Stroke the path
/// \param fill Fill the path using given rule
/// \param text Is text being drawn?
/// \param fillRule Fill rule used in the fill mode
void processPathPainting(const QPainterPath& path, bool stroke, bool fill, bool text, Qt::FillRule fillRule);
enum class MarkedContentKind
{
OptionalContent,