mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
LibPDF: Remove unused Renderer argument from append_glyph_path()
This argument has been unused since it was added. No behavior change.
This commit is contained in:
1 parent
f0056dbba7
commit
1943bf75e5
6 files changed
+10
-10
No files matched your search
@@ -96,7 +96,7 @@ PDFErrorOr<Gfx::FloatPoint> SimpleFont::append_text_path(Gfx::Path& path, Gfx::F
|
||||
return for_each_glyph_position(position, string, renderer, [&](Gfx::FloatPoint glyph_position, float glyph_width, u8 char_code) {
|
||||
// The glyph position is in terms of the `renderer.text_state().font_size`, so we need to scale it to the requested font size.
|
||||
glyph_width *= text_rendering_matrix.x_scale() / horizontal_scaling;
|
||||
return append_glyph_path(path, glyph_position.scaled(text_rendering_matrix.x_scale() / horizontal_scaling, 1), glyph_width, char_code, renderer);
|
||||
return append_glyph_path(path, glyph_position.scaled(text_rendering_matrix.x_scale() / horizontal_scaling, 1), glyph_width, char_code);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ protected:
|
||||
virtual Optional<float> get_glyph_width(u8 char_code) const = 0;
|
||||
virtual PDFErrorOr<void> draw_glyph(Gfx::Painter& painter, Gfx::FloatPoint point, float width, u8 char_code, Renderer const&) = 0;
|
||||
|
||||
virtual PDFErrorOr<void> append_glyph_path(Gfx::Path&, Gfx::FloatPoint, float, u8, Renderer const&)
|
||||
virtual PDFErrorOr<void> append_glyph_path(Gfx::Path&, Gfx::FloatPoint, float, u8)
|
||||
{
|
||||
return Error { Error::Type::RenderingUnsupported, "append_glyph_path not implemented for font" };
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ PDFErrorOr<void> TrueTypePainter::draw_glyph(Gfx::Painter& painter, Gfx::FloatPo
|
||||
return {};
|
||||
}
|
||||
|
||||
PDFErrorOr<void> TrueTypePainter::append_glyph_path(Gfx::Path& path, Gfx::FloatPoint point, u8 char_code, Renderer const&)
|
||||
PDFErrorOr<void> TrueTypePainter::append_glyph_path(Gfx::Path& path, Gfx::FloatPoint point, u8 char_code)
|
||||
{
|
||||
auto glyph_id = TRY(resolve_glyph_id_for_char_code(char_code));
|
||||
if (glyph_id.has_value()) {
|
||||
@@ -219,9 +219,9 @@ PDFErrorOr<void> TrueTypeFont::draw_glyph(Gfx::Painter& painter, Gfx::FloatPoint
|
||||
return m_font_painter->draw_glyph(painter, point, char_code, renderer);
|
||||
}
|
||||
|
||||
PDFErrorOr<void> TrueTypeFont::append_glyph_path(Gfx::Path& path, Gfx::FloatPoint point, float, u8 char_code, Renderer const& renderer)
|
||||
PDFErrorOr<void> TrueTypeFont::append_glyph_path(Gfx::Path& path, Gfx::FloatPoint point, float, u8 char_code)
|
||||
{
|
||||
return m_font_painter->append_glyph_path(path, point, char_code, renderer);
|
||||
return m_font_painter->append_glyph_path(path, point, char_code);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
Optional<float> get_glyph_width(u8 char_code) const;
|
||||
void set_font_size(float font_size);
|
||||
|
||||
PDFErrorOr<void> append_glyph_path(Gfx::Path&, Gfx::FloatPoint point, u8 char_code, Renderer const&);
|
||||
PDFErrorOr<void> append_glyph_path(Gfx::Path&, Gfx::FloatPoint point, u8 char_code);
|
||||
|
||||
private:
|
||||
TrueTypePainter(AK::NonnullRefPtr<Gfx::ScaledFont>, NonnullRefPtr<Encoding>, bool encoding_is_mac_roman_or_win_ansi, bool is_nonsymbolic, Optional<u8> high_byte, bool is_zapf_dingbats);
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
void set_font_size(float font_size) override;
|
||||
PDFErrorOr<void> draw_glyph(Gfx::Painter&, Gfx::FloatPoint, float, u8, Renderer const&) override;
|
||||
|
||||
PDFErrorOr<void> append_glyph_path(Gfx::Path&, Gfx::FloatPoint point, float, u8 char_code, Renderer const&) override;
|
||||
PDFErrorOr<void> append_glyph_path(Gfx::Path&, Gfx::FloatPoint point, float, u8 char_code) override;
|
||||
|
||||
DeprecatedFlyString base_font_name() const { return m_base_font_name; }
|
||||
|
||||
|
||||
@@ -149,10 +149,10 @@ PDFErrorOr<void> Type1Font::draw_glyph(Gfx::Painter& painter, Gfx::FloatPoint po
|
||||
return {};
|
||||
}
|
||||
|
||||
PDFErrorOr<void> Type1Font::append_glyph_path(Gfx::Path& path, Gfx::FloatPoint point, float width, u8 char_code, Renderer const& renderer)
|
||||
PDFErrorOr<void> Type1Font::append_glyph_path(Gfx::Path& path, Gfx::FloatPoint point, float width, u8 char_code)
|
||||
{
|
||||
if (!m_font_program)
|
||||
return m_fallback_font_painter->append_glyph_path(path, point, char_code, renderer);
|
||||
return m_fallback_font_painter->append_glyph_path(path, point, char_code);
|
||||
|
||||
auto char_name = char_name_for_char_code(char_code);
|
||||
path.move_to(point);
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
void set_font_size(float font_size) override;
|
||||
PDFErrorOr<void> draw_glyph(Gfx::Painter& painter, Gfx::FloatPoint point, float width, u8 char_code, Renderer const&) override;
|
||||
|
||||
virtual PDFErrorOr<void> append_glyph_path(Gfx::Path& path, Gfx::FloatPoint point, float width, u8 char_code, Renderer const&) override;
|
||||
virtual PDFErrorOr<void> append_glyph_path(Gfx::Path& path, Gfx::FloatPoint point, float width, u8 char_code) override;
|
||||
|
||||
DeprecatedFlyString base_font_name() const { return m_base_font_name; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user