mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:27:45 +00:00
PixelPaint: Propagate errors in {flip,crop,rotate,resize} functions
We now propagate errors when using the {Layer,Image}::flip(), {Layer,Image}::crop(), {Layer,Image}::rotate() and {Layer,Image}::resize() functions. We handle these errors by show an error DialogBox with the error's message. This removes 8 FIXMEs:))
This commit is contained in:
parent
65b420f996
commit
e89c649be1
6 changed files with 232 additions and 67 deletions
|
@ -97,10 +97,10 @@ public:
|
|||
|
||||
size_t index_of(Layer const&) const;
|
||||
|
||||
void flip(Gfx::Orientation orientation);
|
||||
void rotate(Gfx::RotationDirection direction);
|
||||
void crop(Gfx::IntRect const& rect);
|
||||
void resize(Gfx::IntSize new_size, Gfx::Painter::ScalingMode scaling_mode);
|
||||
ErrorOr<void> flip(Gfx::Orientation orientation);
|
||||
ErrorOr<void> rotate(Gfx::RotationDirection direction);
|
||||
ErrorOr<void> crop(Gfx::IntRect const& rect);
|
||||
ErrorOr<void> resize(Gfx::IntSize new_size, Gfx::Painter::ScalingMode scaling_mode);
|
||||
|
||||
Optional<Gfx::IntRect> nonempty_content_bounding_rect() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue