1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 21:37:35 +00:00

Demos/Eyes: Render eyes antialiased

This looks good, and is a good way to test ellipse rendering is
working properly.
This commit is contained in:
MacDue 2022-03-21 01:52:19 +00:00 committed by Linus Groh
parent 89445b967d
commit cf5b6c5c8d
2 changed files with 9 additions and 7 deletions

View file

@ -9,6 +9,7 @@
#include <LibGUI/MouseTracker.h>
#include <LibGUI/Widget.h>
#include <LibGfx/AntiAliasingPainter.h>
class EyesWidget final : public GUI::Widget
, GUI::MouseTracker {
@ -29,7 +30,7 @@ private:
virtual void paint_event(GUI::PaintEvent&) override;
virtual void track_mouse_move(Gfx::IntPoint const&) override;
void render_eyeball(int row, int column, GUI::Painter&) const;
void render_eyeball(int row, int column, Gfx::AntiAliasingPainter& aa_painter) const;
Gfx::IntPoint pupil_center(Gfx::IntRect& eyeball_bounds) const;
Gfx::IntPoint m_mouse_position;