mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:37:35 +00:00
PixelPaint: Add actions to rotate image left/right
This also required adding a new hook to `ImageClient`, since there wasn't a way of telling the ImageEditor that the full rect of the image has changed (as when we rotate).
This commit is contained in:
parent
6a8c408856
commit
ca6c9be94c
5 changed files with 46 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
|||
#include <LibCore/File.h>
|
||||
#include <LibGUI/Command.h>
|
||||
#include <LibGUI/Forward.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <LibGfx/Forward.h>
|
||||
#include <LibGfx/Rect.h>
|
||||
#include <LibGfx/Size.h>
|
||||
|
@ -32,6 +33,7 @@ public:
|
|||
virtual void image_did_modify_layer_bitmap(size_t) { }
|
||||
virtual void image_did_modify_layer_stack() { }
|
||||
virtual void image_did_change(Gfx::IntRect const&) { }
|
||||
virtual void image_did_change_rect(Gfx::IntRect const&) { }
|
||||
virtual void image_select_layer(Layer*) { }
|
||||
virtual void image_did_change_title(String const&) { }
|
||||
|
||||
|
@ -92,6 +94,7 @@ public:
|
|||
void set_title(String);
|
||||
|
||||
void flip(Gfx::Orientation orientation);
|
||||
void rotate(Gfx::RotationDirection direction);
|
||||
|
||||
private:
|
||||
explicit Image(Gfx::IntSize const&);
|
||||
|
@ -101,6 +104,7 @@ private:
|
|||
static Result<NonnullRefPtr<Image>, String> try_create_from_pixel_paint_file(Core::File& file, String const& file_path);
|
||||
|
||||
void did_change(Gfx::IntRect const& modified_rect = {});
|
||||
void did_change_rect();
|
||||
void did_modify_layer_stack();
|
||||
|
||||
String m_path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue