mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 09:36:08 +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
Notes:
sideshowbarker
2024-07-18 12:14:42 +09:00
Author: https://github.com/awesomekling
Commit: 1b897ec561
6 changed files with 61 additions and 0 deletions
18
Userland/Applications/PixelPaint/Selection.cpp
Normal file
18
Userland/Applications/PixelPaint/Selection.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "Selection.h"
|
||||
#include "ImageEditor.h"
|
||||
#include <LibGfx/Painter.h>
|
||||
|
||||
namespace PixelPaint {
|
||||
|
||||
void Selection::paint(Gfx::Painter& painter, ImageEditor const& editor)
|
||||
{
|
||||
painter.draw_rect(editor.image_rect_to_editor_rect(m_rect).to_type<int>(), Color::Magenta);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue