mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
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:
parent
d922e35579
commit
22585e2845
4 changed files with 38 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue