Coverage Report

Created: 2024-09-14 07:19

/src/skia/modules/svg/include/SkSVGClipPath.h
Line
Count
Source
1
/*
2
 * Copyright 2016 Google Inc.
3
 *
4
 * Use of this source code is governed by a BSD-style license that can be
5
 * found in the LICENSE file.
6
 */
7
8
#ifndef SkSVGClipPath_DEFINED
9
#define SkSVGClipPath_DEFINED
10
11
#include "include/core/SkPath.h"
12
#include "include/core/SkRefCnt.h"
13
#include "include/private/base/SkAPI.h"
14
#include "modules/svg/include/SkSVGHiddenContainer.h"
15
#include "modules/svg/include/SkSVGNode.h"
16
#include "modules/svg/include/SkSVGTypes.h"
17
18
class SkSVGRenderContext;
19
20
class SK_API SkSVGClipPath final : public SkSVGHiddenContainer {
21
public:
22
85
    static sk_sp<SkSVGClipPath> Make() {
23
85
        return sk_sp<SkSVGClipPath>(new SkSVGClipPath());
24
85
    }
25
26
    SVG_ATTR(ClipPathUnits, SkSVGObjectBoundingBoxUnits,
27
             SkSVGObjectBoundingBoxUnits(SkSVGObjectBoundingBoxUnits::Type::kUserSpaceOnUse))
28
29
private:
30
    friend class SkSVGRenderContext;
31
32
    SkSVGClipPath();
33
34
    bool parseAndSetAttribute(const char*, const char*) override;
35
36
    SkPath resolveClip(const SkSVGRenderContext&) const;
37
38
    using INHERITED = SkSVGHiddenContainer;
39
};
40
41
#endif // SkSVGClipPath_DEFINED