1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 14:27:34 +00:00

Meta+Userland: Pass Gfx::IntPoint by value

This is just two ints or 8 bytes or the size of the reference on
x86_64 or AArch64.
This commit is contained in:
MacDue 2022-12-06 20:27:44 +00:00 committed by Andreas Kling
parent bbc149ebb9
commit 7be0b27dd3
161 changed files with 442 additions and 441 deletions

View file

@ -41,7 +41,7 @@ public:
virtual u32 char_code_to_code_point(u16 char_code) const = 0;
virtual float get_char_width(u16 char_code) const = 0;
virtual void draw_glyph(Gfx::Painter& painter, Gfx::IntPoint const& point, float width, u32 char_code, Color color) = 0;
virtual void draw_glyph(Gfx::Painter& painter, Gfx::IntPoint point, float width, u32 char_code, Color color) = 0;
virtual bool is_standard_font() const { return m_is_standard_font; }
virtual Type type() const = 0;

View file

@ -65,7 +65,7 @@ float TrueTypeFont::get_char_width(u16 char_code) const
return static_cast<float>(width) / 1000.0f;
}
void TrueTypeFont::draw_glyph(Gfx::Painter& painter, Gfx::IntPoint const& point, float, u32 char_code, Color color)
void TrueTypeFont::draw_glyph(Gfx::Painter& painter, Gfx::IntPoint point, float, u32 char_code, Color color)
{
if (!m_data.font)
return;

View file

@ -24,7 +24,7 @@ public:
u32 char_code_to_code_point(u16 char_code) const override;
float get_char_width(u16 char_code) const override;
void draw_glyph(Gfx::Painter&, Gfx::IntPoint const&, float, u32, Color) override;
void draw_glyph(Gfx::Painter&, Gfx::IntPoint, float, u32, Color) override;
Type type() const override { return PDFFont::Type::TrueType; }

View file

@ -6,6 +6,7 @@
#pragma once
#include <LibGfx/Point.h>
#include <LibPDF/Fonts/PDFFont.h>
namespace PDF {
@ -26,7 +27,7 @@ public:
u32 char_code_to_code_point(u16 char_code) const override;
float get_char_width(u16 char_code) const override;
void draw_glyph(Gfx::Painter&, Gfx::IntPoint const&, float, u32, Color) override {};
void draw_glyph(Gfx::Painter&, Gfx::IntPoint, float, u32, Color) override {};
Type type() const override { return PDFFont::Type::Type0; }

View file

@ -73,7 +73,7 @@ float Type1Font::get_char_width(u16 char_code) const
return static_cast<float>(width) / 1000.0f;
}
void Type1Font::draw_glyph(Gfx::Painter& painter, Gfx::IntPoint const& point, float width, u32 char_code, Color color)
void Type1Font::draw_glyph(Gfx::Painter& painter, Gfx::IntPoint point, float width, u32 char_code, Color color)
{
if (!m_data.font_program)
return;

View file

@ -27,7 +27,7 @@ public:
u32 char_code_to_code_point(u16 char_code) const override;
float get_char_width(u16 char_code) const override;
void draw_glyph(Gfx::Painter& painter, Gfx::IntPoint const& point, float width, u32 char_code, Color color) override;
void draw_glyph(Gfx::Painter& painter, Gfx::IntPoint point, float width, u32 char_code, Color color) override;
Type type() const override { return PDFFont::Type::Type1; }