2024-07-05 13:36:55 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2024, Andreas Kling <andreas@ladybird.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/NonnullOwnPtr.h>
|
|
|
|
#include <LibGfx/Bitmap.h>
|
|
|
|
#include <LibGfx/Painter.h>
|
2024-09-25 13:44:58 +00:00
|
|
|
#include <LibGfx/PaintingSurface.h>
|
2024-07-05 13:36:55 +00:00
|
|
|
|
|
|
|
namespace Gfx {
|
|
|
|
|
|
|
|
class PainterSkia final : public Painter {
|
|
|
|
public:
|
2024-09-25 13:44:58 +00:00
|
|
|
explicit PainterSkia(NonnullRefPtr<Gfx::PaintingSurface>);
|
2024-07-05 13:36:55 +00:00
|
|
|
virtual ~PainterSkia() override;
|
|
|
|
|
|
|
|
virtual void clear_rect(Gfx::FloatRect const&, Color) override;
|
|
|
|
virtual void fill_rect(Gfx::FloatRect const&, Color) override;
|
2024-11-09 04:48:17 +00:00
|
|
|
virtual void draw_bitmap(Gfx::FloatRect const& dst_rect, Gfx::ImmutableBitmap const& src_bitmap, Gfx::IntRect const& src_rect, Gfx::ScalingMode, float global_alpha) override;
|
2024-08-08 13:12:29 +00:00
|
|
|
virtual void stroke_path(Gfx::Path const&, Gfx::Color, float thickness) override;
|
|
|
|
virtual void stroke_path(Gfx::Path const&, Gfx::PaintStyle const&, float thickness, float global_alpha) override;
|
|
|
|
virtual void fill_path(Gfx::Path const&, Gfx::Color, Gfx::WindingRule) override;
|
|
|
|
virtual void fill_path(Gfx::Path const&, Gfx::PaintStyle const&, float global_alpha, Gfx::WindingRule) override;
|
2024-07-05 13:36:55 +00:00
|
|
|
virtual void set_transform(Gfx::AffineTransform const&) override;
|
|
|
|
virtual void save() override;
|
|
|
|
virtual void restore() override;
|
2024-08-15 05:19:25 +00:00
|
|
|
virtual void clip(Gfx::Path const&, Gfx::WindingRule) override;
|
2024-07-05 13:36:55 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
struct Impl;
|
|
|
|
Impl& impl() { return *m_impl; }
|
|
|
|
NonnullOwnPtr<Impl> m_impl;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|