From 3037f5b1834ed34352a198c9de5b3273792d49f6 Mon Sep 17 00:00:00 2001 From: Crax97 Date: Mon, 29 Aug 2022 22:48:35 +0200 Subject: [PATCH] PixelPaint: Add point_position_to_preferred_cell method to Tool This method is used to point a position at the preferred pixel of the image. Certain tools may want to specify a different preferred pixel for the same input position. --- Userland/Applications/PixelPaint/Tools/Tool.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Applications/PixelPaint/Tools/Tool.h b/Userland/Applications/PixelPaint/Tools/Tool.h index b3634934aa..3b9ac32a7b 100644 --- a/Userland/Applications/PixelPaint/Tools/Tool.h +++ b/Userland/Applications/PixelPaint/Tools/Tool.h @@ -64,6 +64,7 @@ public: virtual void on_tool_activation() { } virtual GUI::Widget* get_properties_widget() { return nullptr; } virtual Variant> cursor() { return Gfx::StandardCursor::None; } + virtual Gfx::IntPoint point_position_to_preferred_cell(Gfx::FloatPoint const& position) const { return position.to_type(); } void clear() { m_editor = nullptr; } void setup(ImageEditor&);