mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +00:00
LibPDF: Pass Renderer to ColorSpace
This commit is contained in:
parent
649f1df771
commit
60c4803dd3
Notes:
sideshowbarker
2024-07-18 05:01:22 +09:00
Author: https://github.com/X-yl
Commit: 60c4803dd3
Pull-request: https://github.com/SerenityOS/serenity/pull/22197
Reviewed-by: https://github.com/nico ✅
3 changed files with 27 additions and 26 deletions
|
@ -1059,7 +1059,7 @@ PDFErrorOr<NonnullRefPtr<ColorSpace>> Renderer::get_color_space_from_resources(V
|
|||
if (!maybe_color_space_family.is_error()) {
|
||||
auto color_space_family = maybe_color_space_family.release_value();
|
||||
if (color_space_family.may_be_specified_directly()) {
|
||||
return ColorSpace::create(color_space_name);
|
||||
return ColorSpace::create(color_space_name, *this);
|
||||
}
|
||||
}
|
||||
auto color_space_resource_dict = TRY(resources->get_dict(m_document, CommonNames::ColorSpace));
|
||||
|
@ -1072,7 +1072,7 @@ PDFErrorOr<NonnullRefPtr<ColorSpace>> Renderer::get_color_space_from_resources(V
|
|||
|
||||
PDFErrorOr<NonnullRefPtr<ColorSpace>> Renderer::get_color_space_from_document(NonnullRefPtr<Object> color_space_object)
|
||||
{
|
||||
return ColorSpace::create(m_document, color_space_object);
|
||||
return ColorSpace::create(m_document, color_space_object, *this);
|
||||
}
|
||||
|
||||
Gfx::AffineTransform const& Renderer::calculate_text_rendering_matrix() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue