mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 07:38:10 +00:00
PixelPaint: Add a Selection class (ImageEditor has a Selection)
This will represent a complex, region-based selection in the future. For now though, it's just a simple rectangle. :^)
This commit is contained in:
parent
96b52f13e4
commit
1b897ec561
6 changed files with 61 additions and 0 deletions
|
@ -95,6 +95,9 @@ void ImageEditor::paint_event(GUI::PaintEvent& event)
|
|||
if (m_active_layer) {
|
||||
painter.draw_rect(enclosing_int_rect(image_rect_to_editor_rect(m_active_layer->relative_rect())).inflated(2, 2), Color::Black);
|
||||
}
|
||||
|
||||
if (!m_selection.is_empty())
|
||||
m_selection.paint(painter, *this);
|
||||
}
|
||||
|
||||
Gfx::FloatRect ImageEditor::layer_rect_to_editor_rect(Layer const& layer, Gfx::IntRect const& layer_rect) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue