mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
PixelPaint: Correctly offset stroke position for even thicknesses
This commit is contained in:
parent
be4485fe85
commit
cd7473d1a3
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ void Tool::on_keydown(GUI::KeyEvent& event)
|
|||
Gfx::IntPoint Tool::editor_stroke_position(Gfx::IntPoint const& pixel_coords, int stroke_thickness) const
|
||||
{
|
||||
auto position = m_editor->image_position_to_editor_position(pixel_coords);
|
||||
auto offset = (stroke_thickness % 2 == 0) ? m_editor->scale() : m_editor->scale() / 2;
|
||||
auto offset = (stroke_thickness % 2 == 0) ? 0 : m_editor->scale() / 2;
|
||||
position = position.translated(offset, offset);
|
||||
return position.to_type<int>();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue