summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibPDF
diff options
context:
space:
mode:
authorMacDue <macdue@dueutil.tech>2022-12-06 20:27:44 +0000
committerAndreas Kling <kling@serenityos.org>2022-12-07 11:48:27 +0100
commit7be0b27dd3cd7185c1b8dc52747c50aad479bc6a (patch)
tree30d42673a64ebb4a6274760e0016f78d6fa91fca /Userland/Libraries/LibPDF
parentbbc149ebb935532c9382278ed98cf9fe8a616422 (diff)
downloadserenity-7be0b27dd3cd7185c1b8dc52747c50aad479bc6a.zip
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.
Diffstat (limited to 'Userland/Libraries/LibPDF')
-rw-r--r--Userland/Libraries/LibPDF/Fonts/PDFFont.h2
-rw-r--r--Userland/Libraries/LibPDF/Fonts/TrueTypeFont.cpp2
-rw-r--r--Userland/Libraries/LibPDF/Fonts/TrueTypeFont.h2
-rw-r--r--Userland/Libraries/LibPDF/Fonts/Type0Font.h3
-rw-r--r--Userland/Libraries/LibPDF/Fonts/Type1Font.cpp2
-rw-r--r--Userland/Libraries/LibPDF/Fonts/Type1Font.h2
6 files changed, 7 insertions, 6 deletions
diff --git a/Userland/Libraries/LibPDF/Fonts/PDFFont.h b/Userland/Libraries/LibPDF/Fonts/PDFFont.h
index 555c81a929..ffa49a6da2 100644
--- a/Userland/Libraries/LibPDF/Fonts/PDFFont.h
+++ b/Userland/Libraries/LibPDF/Fonts/PDFFont.h
@@ -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;
diff --git a/Userland/Libraries/LibPDF/Fonts/TrueTypeFont.cpp b/Userland/Libraries/LibPDF/Fonts/TrueTypeFont.cpp
index 89b7cfc623..f6b07249d8 100644
--- a/Userland/Libraries/LibPDF/Fonts/TrueTypeFont.cpp
+++ b/Userland/Libraries/LibPDF/Fonts/TrueTypeFont.cpp
@@ -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;
diff --git a/Userland/Libraries/LibPDF/Fonts/TrueTypeFont.h b/Userland/Libraries/LibPDF/Fonts/TrueTypeFont.h
index 68c3df28d4..a96c857ad9 100644
--- a/Userland/Libraries/LibPDF/Fonts/TrueTypeFont.h
+++ b/Userland/Libraries/LibPDF/Fonts/TrueTypeFont.h
@@ -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; }
diff --git a/Userland/Libraries/LibPDF/Fonts/Type0Font.h b/Userland/Libraries/LibPDF/Fonts/Type0Font.h
index f58492c275..15a943dad3 100644
--- a/Userland/Libraries/LibPDF/Fonts/Type0Font.h
+++ b/Userland/Libraries/LibPDF/Fonts/Type0Font.h
@@ -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; }
diff --git a/Userland/Libraries/LibPDF/Fonts/Type1Font.cpp b/Userland/Libraries/LibPDF/Fonts/Type1Font.cpp
index a49fac75e3..392dad2f90 100644
--- a/Userland/Libraries/LibPDF/Fonts/Type1Font.cpp
+++ b/Userland/Libraries/LibPDF/Fonts/Type1Font.cpp
@@ -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;
diff --git a/Userland/Libraries/LibPDF/Fonts/Type1Font.h b/Userland/Libraries/LibPDF/Fonts/Type1Font.h
index a9b07048f1..bd99befdd1 100644
--- a/Userland/Libraries/LibPDF/Fonts/Type1Font.h
+++ b/Userland/Libraries/LibPDF/Fonts/Type1Font.h
@@ -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; }