1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:17:34 +00:00

LibPDF: Add basic tiled, coloured pattern rendering

This commit is contained in:
Kyle Pereira 2023-12-07 13:07:56 +00:00 committed by Andreas Kling
parent 8191f2b47a
commit 8ff87911a3
5 changed files with 129 additions and 20 deletions

View file

@ -252,4 +252,24 @@ private:
NonnullRefPtr<Function> m_tint_transform;
Vector<Value> mutable m_tint_output_values;
};
class PatternColorSpace final : public ColorSpace {
public:
static NonnullRefPtr<PatternColorSpace> create(Renderer& renderer);
~PatternColorSpace() override = default;
PDFErrorOr<ColorOrStyle> style(ReadonlySpan<Value> arguments) const override;
int number_of_components() const override;
Vector<float> default_decode() const override;
ColorSpaceFamily const& family() const override { return ColorSpaceFamily::Pattern; }
private:
PatternColorSpace(Renderer& renderer)
: m_renderer(renderer)
{
}
Renderer& m_renderer;
};
}