From 808f1f63ff47db3d5a7a4ce23e45e03ff33f5075 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 19 Jul 2021 20:50:27 +0200 Subject: [PATCH] LibTTF: Minor const correctness fix in TTF rasterizer --- Userland/Libraries/LibTTF/Glyf.cpp | 4 ++-- Userland/Libraries/LibTTF/Glyf.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibTTF/Glyf.cpp b/Userland/Libraries/LibTTF/Glyf.cpp index c2c44fa2a0a..01d8cecdcef 100644 --- a/Userland/Libraries/LibTTF/Glyf.cpp +++ b/Userland/Libraries/LibTTF/Glyf.cpp @@ -382,7 +382,7 @@ static void get_ttglyph_offsets(ReadonlyBytes const& slice, u32 num_points, u32 *y_offset = *x_offset + x_size; } -void Glyf::Glyph::rasterize_impl(Rasterizer& rasterizer, Gfx::AffineTransform& affine) const +void Glyf::Glyph::rasterize_impl(Rasterizer& rasterizer, Gfx::AffineTransform const& transform) const { // Get offset for flags, x, and y. u16 num_points = be_u16(m_slice.offset_pointer((m_num_contours - 1) * 2)) + 1; @@ -394,7 +394,7 @@ void Glyf::Glyph::rasterize_impl(Rasterizer& rasterizer, Gfx::AffineTransform& a // Prepare to render glyph. Gfx::Path path; - PointIterator point_iterator(m_slice, num_points, flags_offset, x_offset, y_offset, affine); + PointIterator point_iterator(m_slice, num_points, flags_offset, x_offset, y_offset, transform); int last_contour_end = -1; i32 contour_index = 0; diff --git a/Userland/Libraries/LibTTF/Glyf.h b/Userland/Libraries/LibTTF/Glyf.h index 39c54181a3f..1cfdf68ed7f 100644 --- a/Userland/Libraries/LibTTF/Glyf.h +++ b/Userland/Libraries/LibTTF/Glyf.h @@ -101,7 +101,7 @@ public: u32 m_offset { 0 }; }; - void rasterize_impl(Rasterizer& rasterizer, Gfx::AffineTransform& affine) const; + void rasterize_impl(Rasterizer&, Gfx::AffineTransform const&) const; RefPtr rasterize_simple(float x_scale, float y_scale) const; template RefPtr rasterize_composite(float x_scale, float y_scale, GlyphCb glyph_callback) const