1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

Revert "LibPDF: Add basic tiled, coloured pattern rendering"

This reverts commit 8ff87911a3.
This commit is contained in:
Nico Weber 2023-12-19 18:49:12 -05:00 committed by Andreas Kling
parent 7cb216c95b
commit 6032c06f6b
5 changed files with 20 additions and 129 deletions

View file

@ -616,8 +616,14 @@ RENDERER_HANDLER(set_stroking_color)
RENDERER_HANDLER(set_stroking_color_extended)
{
// FIXME: Pattern color spaces might need extra resources
state().paint_style = TRY(state().paint_color_space->style(args));
// FIXME: Handle Pattern color spaces
auto last_arg = args.last();
if (last_arg.has<NonnullRefPtr<Object>>() && last_arg.get<NonnullRefPtr<Object>>()->is<NameObject>()) {
dbgln("pattern space {}", last_arg.get<NonnullRefPtr<Object>>()->cast<NameObject>()->name());
return Error::rendering_unsupported_error("Pattern color spaces not yet implemented");
}
state().stroke_style = TRY(state().stroke_color_space->style(args));
return {};
}
@ -629,7 +635,13 @@ RENDERER_HANDLER(set_painting_color)
RENDERER_HANDLER(set_painting_color_extended)
{
// FIXME: Pattern color spaces might need extra resources
// FIXME: Handle Pattern color spaces
auto last_arg = args.last();
if (last_arg.has<NonnullRefPtr<Object>>() && last_arg.get<NonnullRefPtr<Object>>()->is<NameObject>()) {
dbgln("pattern space {}", last_arg.get<NonnullRefPtr<Object>>()->cast<NameObject>()->name());
return Error::rendering_unsupported_error("Pattern color spaces not yet implemented");
}
state().paint_style = TRY(state().paint_color_space->style(args));
return {};
}