mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 10:19:03 +03:00
LibTTF: Minor const correctness fix in TTF rasterizer
This commit is contained in:
parent
d8f435fa50
commit
808f1f63ff
Notes:
sideshowbarker
2024-07-18 08:43:27 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/808f1f63ff4
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user