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:
parent
08c04f0a41
commit
5aefd7f828
6 changed files with 57 additions and 21 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue