mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibGfx: Move AnimationWriter to its own file
No behavior change.
This commit is contained in:
Notes:
sideshowbarker
2024-07-16 22:34:39 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/6c79efcae4 Pull-request: https://github.com/SerenityOS/serenity/pull/24288
26
Userland/Libraries/LibGfx/ImageFormats/AnimationWriter.h
Normal file
26
Userland/Libraries/LibGfx/ImageFormats/AnimationWriter.h
Normal 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;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user