mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:07:45 +00:00
LibTTF: Minor const correctness fix in TTF rasterizer
This commit is contained in:
parent
d8f435fa50
commit
808f1f63ff
2 changed files with 3 additions and 3 deletions
|
@ -382,7 +382,7 @@ static void get_ttglyph_offsets(ReadonlyBytes const& slice, u32 num_points, u32
|
||||||
*y_offset = *x_offset + x_size;
|
*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.
|
// Get offset for flags, x, and y.
|
||||||
u16 num_points = be_u16(m_slice.offset_pointer((m_num_contours - 1) * 2)) + 1;
|
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.
|
// Prepare to render glyph.
|
||||||
Gfx::Path path;
|
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;
|
int last_contour_end = -1;
|
||||||
i32 contour_index = 0;
|
i32 contour_index = 0;
|
||||||
|
|
|
@ -101,7 +101,7 @@ public:
|
||||||
u32 m_offset { 0 };
|
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;
|
RefPtr<Gfx::Bitmap> rasterize_simple(float x_scale, float y_scale) const;
|
||||||
template<typename GlyphCb>
|
template<typename GlyphCb>
|
||||||
RefPtr<Gfx::Bitmap> rasterize_composite(float x_scale, float y_scale, GlyphCb glyph_callback) const
|
RefPtr<Gfx::Bitmap> rasterize_composite(float x_scale, float y_scale, GlyphCb glyph_callback) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue