mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:07:36 +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
|
@ -12,6 +12,7 @@ public:
|
|||
virtual void on_mousedown(GMouseEvent&) { }
|
||||
virtual void on_mousemove(GMouseEvent&) { }
|
||||
virtual void on_mouseup(GMouseEvent&) { }
|
||||
virtual void on_contextmenu(GContextMenuEvent&) { }
|
||||
|
||||
void clear() { m_widget = nullptr; }
|
||||
void setup(PaintableWidget& widget) { m_widget = widget.make_weak_ptr(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue