mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-21 16:58:58 +00:00
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.
This commit is contained in:
parent
059a9c71a0
commit
3037f5b183
Notes:
sideshowbarker
2024-07-17 18:08:55 +09:00
Author: https://github.com/Crax97
Commit: 3037f5b183
Pull-request: https://github.com/SerenityOS/serenity/pull/15069
Reviewed-by: https://github.com/gmta
1 changed files with 1 additions and 0 deletions
|
@ -64,6 +64,7 @@ public:
|
|||
virtual void on_tool_activation() { }
|
||||
virtual GUI::Widget* get_properties_widget() { return nullptr; }
|
||||
virtual Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> cursor() { return Gfx::StandardCursor::None; }
|
||||
virtual Gfx::IntPoint point_position_to_preferred_cell(Gfx::FloatPoint const& position) const { return position.to_type<int>(); }
|
||||
|
||||
void clear() { m_editor = nullptr; }
|
||||
void setup(ImageEditor&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue