mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00: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:
parent
3d756e89c8
commit
7d544344ca
2 changed files with 6 additions and 0 deletions
|
@ -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>();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue