Skip to content

Commit

Permalink
Apply paint style in the Sprite::draw_scaled function. (#3055)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatusGuy authored Oct 15, 2024
1 parent 86dfe82 commit 5f5f2a1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sprite/sprite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,12 @@ Sprite::draw_scaled(Canvas& canvas, const Rectf& dest_rect, int layer,
context.set_flip(context.get_flip() ^ flip);
context.set_alpha(context.get_alpha() * m_alpha);

canvas.draw_surface_scaled(m_action->surfaces[m_frameidx], dest_rect, layer);
PaintStyle style;
style.set_color(m_color);
style.set_alpha(m_color.alpha);
style.set_blend(m_blend);

canvas.draw_surface_scaled(m_action->surfaces[m_frameidx], dest_rect, layer, style);

context.pop_transform();
}
Expand Down

0 comments on commit 5f5f2a1

Please sign in to comment.