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

PaintBrush: Implement a thickness setting for the pen tool.

Painter gains the ability to draw lines with arbitrary thickness.
It's basically implemented by drawing filled rects for thickness>1.

In PaintBrush, Tool classes can now override on_contextmenu() to
provide a context menu for the toolbox button. :^)
This commit is contained in:
Andreas Kling 2019-06-23 10:00:02 +02:00
parent 08c04f0a41
commit 5aefd7f828
6 changed files with 57 additions and 21 deletions

View file

@ -20,6 +20,11 @@ public:
const Tool& tool() const { return *m_tool; }
Tool& tool() { return *m_tool; }
virtual void context_menu_event(GContextMenuEvent& event) override
{
m_tool->on_contextmenu(event);
}
private:
OwnPtr<Tool> m_tool;
};