PixelPaint: Expose more complex selection operations

Now that we use RectMask internally to store the selection, we can
expose more powerful APIs to allow for better control over the image
selection.
This commit is contained in:
Davipb 2021-06-20 10:53:41 -03:00 committed by Andreas Kling
commit 22585e2845
Notes: sideshowbarker 2024-07-18 11:55:55 +09:00
4 changed files with 38 additions and 3 deletions

View file

@ -60,7 +60,7 @@ void RectangleSelectTool::on_mouseup(Layer&, GUI::MouseEvent&, GUI::MouseEvent&
m_editor->update();
auto rect_in_image = Gfx::IntRect::from_two_points(m_selection_start, m_selection_end);
m_editor->selection().set(rect_in_image);
m_editor->selection().merge(rect_in_image, Selection::MergeMode::Set);
}
void RectangleSelectTool::on_keydown(GUI::KeyEvent& key_event)