1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:57:44 +00:00

PixelPaint: Use ErrorOr<T> for Image and Layer creation helpers

This commit is contained in:
Andreas Kling 2021-11-07 11:22:35 +01:00
parent 9268ed9605
commit 801d46d02c
7 changed files with 76 additions and 113 deletions

View file

@ -25,9 +25,9 @@ class Layer
AK_MAKE_NONMOVABLE(Layer);
public:
static RefPtr<Layer> try_create_with_size(Image&, Gfx::IntSize const&, String name);
static RefPtr<Layer> try_create_with_bitmap(Image&, NonnullRefPtr<Gfx::Bitmap>, String name);
static RefPtr<Layer> try_create_snapshot(Image&, Layer const&);
static ErrorOr<NonnullRefPtr<Layer>> try_create_with_size(Image&, Gfx::IntSize const&, String name);
static ErrorOr<NonnullRefPtr<Layer>> try_create_with_bitmap(Image&, NonnullRefPtr<Gfx::Bitmap>, String name);
static ErrorOr<NonnullRefPtr<Layer>> try_create_snapshot(Image&, Layer const&);
~Layer() { }