mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 21:58:10 +00:00

Could do with some more tweaking no doubt, and it'd be nice to have a circular spray, but this is better than nothing.
19 lines
460 B
C++
19 lines
460 B
C++
#pragma once
|
|
|
|
#include "Tool.h"
|
|
#include <SharedGraphics/Point.h>
|
|
|
|
class PenTool final : public Tool {
|
|
public:
|
|
PenTool();
|
|
virtual ~PenTool() override;
|
|
|
|
virtual void on_mousedown(GMouseEvent&) override;
|
|
virtual void on_mousemove(GMouseEvent&) override;
|
|
virtual void on_mouseup(GMouseEvent&) override;
|
|
|
|
private:
|
|
virtual const char* class_name() const override { return "PenTool"; }
|
|
|
|
Point m_last_drawing_event_position { -1, -1 };
|
|
};
|