mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
PixelPaint: Draw the current editor selection as marching ants
This patch moves the marching ants painting code to Selection and unifies the timer mechanism so that all marching ants are synchronized which looks neat. :^)
This commit is contained in:
parent
1b897ec561
commit
4cecd79000
5 changed files with 51 additions and 46 deletions
|
@ -21,13 +21,9 @@ public:
|
|||
virtual void on_second_paint(Layer const&, GUI::PaintEvent&) override;
|
||||
|
||||
private:
|
||||
void draw_marching_ants(Gfx::Painter&, Gfx::IntRect const&) const;
|
||||
|
||||
bool m_selecting { false };
|
||||
Gfx::IntPoint m_selection_start;
|
||||
Gfx::IntPoint m_selection_end;
|
||||
RefPtr<Core::Timer> m_marching_ants_timer;
|
||||
int m_marching_ants_offset { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue