1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 23:48:11 +00:00

PixelPaint: Remove try_ prefix from fallible Image methods

This commit is contained in:
Linus Groh 2023-01-28 20:12:17 +00:00 committed by Jelle Raaijmakers
parent 9c08bb9555
commit 39f1a6eb6f
6 changed files with 31 additions and 31 deletions

View file

@ -45,15 +45,15 @@ protected:
class Image : public RefCounted<Image> {
public:
static ErrorOr<NonnullRefPtr<Image>> try_create_with_size(Gfx::IntSize);
static ErrorOr<NonnullRefPtr<Image>> try_create_from_pixel_paint_json(JsonObject const&);
static ErrorOr<NonnullRefPtr<Image>> try_create_from_bitmap(NonnullRefPtr<Gfx::Bitmap> const&);
static ErrorOr<NonnullRefPtr<Image>> create_with_size(Gfx::IntSize);
static ErrorOr<NonnullRefPtr<Image>> create_from_pixel_paint_json(JsonObject const&);
static ErrorOr<NonnullRefPtr<Image>> create_from_bitmap(NonnullRefPtr<Gfx::Bitmap> const&);
static ErrorOr<NonnullRefPtr<Gfx::Bitmap>> try_decode_bitmap(ReadonlyBytes);
static ErrorOr<NonnullRefPtr<Gfx::Bitmap>> decode_bitmap(ReadonlyBytes);
// This generates a new Bitmap with the final image (all layers composed according to their attributes.)
ErrorOr<NonnullRefPtr<Gfx::Bitmap>> try_compose_bitmap(Gfx::BitmapFormat format) const;
RefPtr<Gfx::Bitmap> try_copy_bitmap(Selection const&) const;
ErrorOr<NonnullRefPtr<Gfx::Bitmap>> compose_bitmap(Gfx::BitmapFormat format) const;
RefPtr<Gfx::Bitmap> copy_bitmap(Selection const&) const;
Selection& selection() { return m_selection; }
Selection const& selection() const { return m_selection; }