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