LibTTF: Minor const correctness fix in TTF rasterizer

This commit is contained in:
Andreas Kling 2021-07-19 20:50:27 +02:00
parent d8f435fa50
commit 808f1f63ff
Notes: sideshowbarker 2024-07-18 08:43:27 +09:00
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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<Gfx::Bitmap> rasterize_simple(float x_scale, float y_scale) const;
template<typename GlyphCb>
RefPtr<Gfx::Bitmap> rasterize_composite(float x_scale, float y_scale, GlyphCb glyph_callback) const