forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SVGGraphicsPaintable.h
32 lines (22 loc) 路 887 Bytes
/
SVGGraphicsPaintable.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* Copyright (c) 2022, Andreas Kling <[email protected]>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Layout/SVGGraphicsBox.h>
#include <LibWeb/Painting/SVGPaintable.h>
namespace Web::Painting {
class SVGGraphicsPaintable : public SVGPaintable {
JS_CELL(SVGGraphicsPaintable, SVGPaintable);
public:
static JS::NonnullGCPtr<SVGGraphicsPaintable> create(Layout::SVGGraphicsBox const&);
Layout::SVGGraphicsBox const& layout_box() const;
virtual bool forms_unconnected_subtree() const override;
virtual Optional<CSSPixelRect> get_masking_area() const override;
virtual Optional<Gfx::Bitmap::MaskKind> get_mask_type() const override;
virtual RefPtr<Gfx::Bitmap> calculate_mask(PaintContext&, CSSPixelRect const& masking_area) const override;
protected:
SVGGraphicsPaintable(Layout::SVGGraphicsBox const&);
};
}