1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 10:27:36 +00:00

PixelPaint: Add copy action (copies the selection from active layer)

You can now select a part of a layer, copy it, and then paste it as
a new layer. Very cool :^)
This commit is contained in:
Andreas Kling 2021-06-14 17:59:15 +02:00
parent 4cecd79000
commit 765286f691
4 changed files with 29 additions and 0 deletions

View file

@ -15,6 +15,7 @@
namespace PixelPaint {
class Image;
class Selection;
class Layer
: public RefCounted<Layer>
@ -56,6 +57,8 @@ public:
int opacity_percent() const { return m_opacity_percent; }
void set_opacity_percent(int);
RefPtr<Gfx::Bitmap> try_copy_bitmap(Selection const&) const;
private:
Layer(Image&, NonnullRefPtr<Gfx::Bitmap>, String name);