Debian Codegraph @

modules/svg/include/SkSVGPath.h

raw
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 SkSVGPath_DEFINED
9 #define SkSVGPath_DEFINED
10
11 #include "include/core/SkPath.h"
12 #include "include/core/SkPathTypes.h"
13 #include "include/core/SkRect.h"
14 #include "include/core/SkRefCnt.h"
15 #include "include/private/base/SkAPI.h"
16 #include "modules/svg/include/SkSVGNode.h"
17 #include "modules/svg/include/SkSVGShape.h"
18
19 class SkCanvas;
20 class SkPaint;
21 class SkSVGLengthContext;
22 class SkSVGRenderContext;
23
24 class SK_API SkSVGPath final : public SkSVGShape {
25 public:
26 static sk_sp<SkSVGPath> Make() { return sk_sp<SkSVGPath>(new SkSVGPath()); }
27
28 SVG_ATTR(Path, SkPath, SkPath())
29
30 protected:
31 bool parseAndSetAttribute(const char*, const char*) override;
32
33 void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&,
34 SkPathFillType) const override;
35
36 SkPath onAsPath(const SkSVGRenderContext&) const override;
37
38 SkRect onTransformableObjectBoundingBox(const SkSVGRenderContext&) const override;
39
40 private:
41 SkSVGPath();
42
43 using INHERITED = SkSVGShape;
44 };
45
46 #endif // SkSVGPath_DEFINED