Coverage Report

Created: 2025-08-28 06:26

/src/serenity/Userland/Libraries/LibWeb/Painting/SVGMaskable.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright (c) 2024, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
3
 *
4
 * SPDX-License-Identifier: BSD-2-Clause
5
 */
6
7
#include <LibWeb/Painting/PaintContext.h>
8
#include <LibWeb/PixelUnits.h>
9
10
#pragma once
11
12
namespace Web::Painting {
13
14
class SVGMaskable {
15
public:
16
0
    virtual ~SVGMaskable() = default;
17
18
    virtual JS::GCPtr<DOM::Node const> dom_node_of_svg() const = 0;
19
20
    Optional<CSSPixelRect> get_masking_area_of_svg() const;
21
    Optional<Gfx::Bitmap::MaskKind> get_mask_type_of_svg() const;
22
    RefPtr<Gfx::Bitmap> calculate_mask_of_svg(PaintContext&, CSSPixelRect const& masking_area) const;
23
};
24
25
}