Chess: Paint move marker antialiased

This commit is contained in:
MacDue 2022-06-05 14:44:13 +01:00 committed by Linus Groh
parent e2de02d2bb
commit 5cb7e4f2f0
Notes: sideshowbarker 2024-07-17 10:26:59 +09:00

View file

@ -12,6 +12,7 @@
#include <LibCore/File.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/Painter.h>
#include <LibGfx/AntiAliasingPainter.h>
#include <LibGfx/Font/Font.h>
#include <LibGfx/Font/FontDatabase.h>
#include <LibGfx/Path.h>
@ -151,7 +152,8 @@ void ChessWidget::paint_event(GUI::PaintEvent& event)
move_point = { (7 - square.file) * tile_width, square.rank * tile_height };
}
painter.fill_ellipse({ move_point + point_offset, rect_size }, Gfx::Color::LightGray);
Gfx::AntiAliasingPainter aa_painter { painter };
aa_painter.fill_ellipse({ move_point + point_offset, rect_size }, Gfx::Color::LightGray);
}
}