fix uneeded pointer indirection with glyph_info/glyph_position
This commit is contained in:
parent
aed5243302
commit
536b23bfde
4 changed files with 7 additions and 7 deletions
|
@ -42,8 +42,8 @@ struct glyph_info;
|
|||
struct glyph_position
|
||||
{
|
||||
glyph_position(glyph_info const& _glyph, pixel_position const& _pos, rotation const& _rot)
|
||||
: glyph(&_glyph), pos(_pos), rot(_rot) { }
|
||||
glyph_info const* glyph;
|
||||
: glyph(_glyph), pos(_pos), rot(_rot) { }
|
||||
glyph_info const& glyph;
|
||||
pixel_position pos;
|
||||
rotation rot;
|
||||
};
|
||||
|
|
|
@ -447,7 +447,7 @@ void cairo_context::add_text(glyph_positions_ptr path,
|
|||
set_operator(halo_comp_op);
|
||||
for (auto const& glyph_pos : *path)
|
||||
{
|
||||
glyph_info const& glyph = *(glyph_pos.glyph);
|
||||
glyph_info const& glyph = glyph_pos.glyph;
|
||||
|
||||
if (glyph.format)
|
||||
{
|
||||
|
@ -479,9 +479,9 @@ void cairo_context::add_text(glyph_positions_ptr path,
|
|||
stroke();
|
||||
}
|
||||
set_operator(comp_op);
|
||||
for (auto const &glyph_pos : *path)
|
||||
for (auto const& glyph_pos : *path)
|
||||
{
|
||||
glyph_info const& glyph = *(glyph_pos.glyph);
|
||||
glyph_info const& glyph = glyph_pos.glyph;
|
||||
|
||||
if (glyph.format)
|
||||
{
|
||||
|
|
|
@ -64,7 +64,7 @@ text_render_thunk::text_render_thunk(placements_list const& placements,
|
|||
|
||||
for (glyph_position const& pos : *positions)
|
||||
{
|
||||
glyph_vec.push_back(*pos.glyph);
|
||||
glyph_vec.push_back(pos.glyph);
|
||||
new_pos.push_back(glyph_vec.back(), pos.pos, pos.rot);
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ void text_renderer::prepare_glyphs(glyph_positions const& positions)
|
|||
|
||||
for (auto const& glyph_pos : positions)
|
||||
{
|
||||
glyph_info const& glyph = *(glyph_pos.glyph);
|
||||
glyph_info const& glyph = glyph_pos.glyph;
|
||||
glyph.face->set_character_sizes(glyph.format->text_size * scale_factor_); //TODO: Optimize this?
|
||||
|
||||
matrix.xx = static_cast<FT_Fixed>( glyph_pos.rot.cos * 0x10000L);
|
||||
|
|
Loading…
Reference in a new issue