mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
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.
This commit is contained in:
parent
55feecee36
commit
3faf089be5
7 changed files with 83 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue