diff options
author | Tim Ledbetter <timledbetter@gmail.com> | 2023-03-24 17:51:24 +0000 |
---|---|---|
committer | Jelle Raaijmakers <jelle@gmta.nl> | 2023-03-26 00:44:26 +0100 |
commit | 3faf089be5bf7be47b92990b0b9d04599c115845 (patch) | |
tree | 9139cd14c6be414cac4e58f4a9f649e6d7d89471 /Userland/Applications/PixelPaint/Image.h | |
parent | 55feecee3646f73b6aee6881fe2de8b2ab01c5be (diff) | |
download | serenity-3faf089be5bf7be47b92990b0b9d04599c115845.zip |
PixelPaint: Add a Duplicate Layer action
The "Duplicate Layer" action inserts a copy of the selected layer into
the layer stack. The new layer is placed above the selected layer.
Diffstat (limited to 'Userland/Applications/PixelPaint/Image.h')
-rw-r--r-- | Userland/Applications/PixelPaint/Image.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Applications/PixelPaint/Image.h b/Userland/Applications/PixelPaint/Image.h index 07c1c7e754..37f3f3b733 100644 --- a/Userland/Applications/PixelPaint/Image.h +++ b/Userland/Applications/PixelPaint/Image.h @@ -65,6 +65,7 @@ public: Gfx::IntRect rect() const { return { {}, m_size }; } void add_layer(NonnullRefPtr<Layer>); + void insert_layer(NonnullRefPtr<Layer>, size_t index); ErrorOr<NonnullRefPtr<Image>> take_snapshot() const; ErrorOr<void> restore_snapshot(Image const&); @@ -124,6 +125,8 @@ private: ErrorOr<void> merge_layers(LayerMergeMode); ErrorOr<void> merge_active_layer(NonnullRefPtr<Layer> const&, LayerMergeDirection); + DeprecatedString generate_unique_layer_name(DeprecatedString const& original_name); + Gfx::IntSize m_size; Vector<NonnullRefPtr<Layer>> m_layers; |