1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

LibCards+Games: Rename "draw" methods to "paint" for clarity

"Draw" is already a card-game term so using it for graphics was
 confusing me a lot!
This commit is contained in:
Sam Atkins 2022-09-28 12:27:19 +01:00 committed by Sam Atkins
parent 6ef0504a42
commit bfa9ae809f
8 changed files with 17 additions and 17 deletions

View file

@ -20,7 +20,7 @@ Card::Card(Suit suit, Rank rank)
VERIFY(to_underlying(rank) < card_count);
}
void Card::draw(GUI::Painter& painter) const
void Card::paint(GUI::Painter& painter) const
{
auto& card_painter = CardPainter::the();
auto bitmap = [&]() {
@ -43,12 +43,12 @@ void Card::save_old_position()
m_old_position_valid = true;
}
void Card::clear_and_draw(GUI::Painter& painter, Color const& background_color)
void Card::clear_and_paint(GUI::Painter& painter, Color const& background_color)
{
if (is_old_position_valid())
clear(painter, background_color);
draw(painter);
paint(painter);
save_old_position();
}