mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02:00
PixelPaint: Add point_position_to_preferred_cell to RectangleSelectTool
Specializing point_position_to_preferred_cell for the RectangleSelectTool as it selects a new cells with a rounding behavior instead of a flooring behavior
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 07:36:45 +09:00
Author: https://github.com/Crax97 Commit: https://github.com/SerenityOS/serenity/commit/7d544344ca Pull-request: https://github.com/SerenityOS/serenity/pull/15069 Reviewed-by: https://github.com/gmta
@@ -211,4 +211,9 @@ GUI::Widget* RectangleSelectTool::get_properties_widget()
|
||||
return m_properties_widget.ptr();
|
||||
}
|
||||
|
||||
Gfx::IntPoint RectangleSelectTool::point_position_to_preferred_cell(Gfx::FloatPoint const& position) const
|
||||
{
|
||||
return position.to_rounded<int>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user