blob: e852f07da41b7f7cf345e25b25f8cb55ab622d01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGfx/Rect.h>
namespace PixelPaint {
class ImageEditor;
// Coordinates are image-relative.
class Selection {
public:
Selection() { }
bool is_empty() const { return m_rect.is_empty(); }
void clear() { m_rect = {}; }
void set(Gfx::IntRect const& rect) { m_rect = rect; }
void paint(Gfx::Painter&, ImageEditor const&);
private:
Gfx::IntRect m_rect;
};
}
|