LibGfx: Move AnimationWriter to its own file

No behavior change.
This commit is contained in:
Nico Weber
2024-05-11 19:53:38 -04:00
committed by Tim Flynn
parent 58cbecbe0c
commit 6c79efcae4
Notes: sideshowbarker 2024-07-16 22:34:39 +09:00
8 changed files with 46 additions and 11 deletions

View File

@@ -0,0 +1,26 @@
/*
* Copyright (c) 2024, Nico Weber <thakis@chromium.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Error.h>
#include <LibGfx/Forward.h>
#include <LibGfx/Point.h>
namespace Gfx {
class AnimationWriter {
public:
virtual ~AnimationWriter();
// Flushes the frame to disk.
// IntRect { at, at + bitmap.size() } must fit in the dimensions
// passed to `start_writing_animation()`.
// FIXME: Consider passing in disposal method and blend mode.
virtual ErrorOr<void> add_frame(Bitmap&, int duration_ms, IntPoint at = {}) = 0;
};
}