mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:57:46 +00:00
PaintBrush: Add a "line" tool for drawing straight lines
This implements "preview" of the line by allowing tool subclasses to hook the second_paint_event on the PaintableWidget. Work towards #375.
This commit is contained in:
parent
f04394b9f3
commit
4e6cd541c9
8 changed files with 137 additions and 9 deletions
|
@ -1,13 +1,14 @@
|
|||
#include "ToolboxWidget.h"
|
||||
#include "BucketTool.h"
|
||||
#include "SprayTool.h"
|
||||
#include "EraseTool.h"
|
||||
#include "LineTool.h"
|
||||
#include "PaintableWidget.h"
|
||||
#include "PenTool.h"
|
||||
#include "PickerTool.h"
|
||||
#include "EraseTool.h"
|
||||
#include "SprayTool.h"
|
||||
#include <LibDraw/PNGLoader.h>
|
||||
#include <LibGUI/GBoxLayout.h>
|
||||
#include <LibGUI/GButton.h>
|
||||
#include <LibDraw/PNGLoader.h>
|
||||
|
||||
class ToolButton final : public GButton {
|
||||
C_OBJECT(ToolButton)
|
||||
|
@ -69,6 +70,7 @@ ToolboxWidget::ToolboxWidget(GWidget* parent)
|
|||
add_tool("Spray", "spray", make<SprayTool>());
|
||||
add_tool("Color Picker", "picker", make<PickerTool>());
|
||||
add_tool("Erase", "eraser", make<EraseTool>());
|
||||
add_tool("Line", "line", make<LineTool>());
|
||||
}
|
||||
|
||||
ToolboxWidget::~ToolboxWidget()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue