1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

LibPDF: Implement color_rendering_intent operator

Implements the `ri` operator, and the `RI` key in a graphics state
dictionary.

We don't do anything yet with the color rendering intent except
store it.

No behavior change except removing a few "not yet implemented"
messages.
This commit is contained in:
Nico Weber 2023-10-19 07:58:22 -04:00 committed by Tim Flynn
parent 609e640530
commit 708d5e2fe6
2 changed files with 10 additions and 2 deletions

View file

@ -180,7 +180,11 @@ RENDERER_HANDLER(set_dash_pattern)
return {};
}
RENDERER_TODO(set_color_rendering_intent)
RENDERER_HANDLER(set_color_rendering_intent)
{
state().color_rendering_intent = MUST(m_document->resolve_to<NameObject>(args[0]))->name();
return {};
}
RENDERER_HANDLER(set_flatness_tolerance)
{
@ -754,7 +758,9 @@ PDFErrorOr<void> Renderer::set_graphics_state_from_dict(NonnullRefPtr<DictObject
TRY(handle_set_dash_pattern(array->elements()));
}
// FIXME: RI
if (dict->contains(CommonNames::RI))
TRY(handle_set_color_rendering_intent({ dict->get_value(CommonNames::RI) }));
// FIXME: OP
// FIXME: op
// FIXME: OPM