skia2/modules/svg/include/SkSVGPath.h
Tyler Denniston c505e435d4 [svg] Refactor <path> to use new parsing
Change-Id: Ib33111e1b00f05d32f8c6add512c38b5a6197af8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/367884
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-02-19 19:20:28 +00:00

37 lines
877 B
C++

/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkSVGPath_DEFINED
#define SkSVGPath_DEFINED
#include "include/core/SkPath.h"
#include "modules/svg/include/SkSVGShape.h"
class SkSVGPath final : public SkSVGShape {
public:
static sk_sp<SkSVGPath> Make() { return sk_sp<SkSVGPath>(new SkSVGPath()); }
SVG_ATTR(Path, SkPath, SkPath())
protected:
bool parseAndSetAttribute(const char*, const char*) override;
void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&,
SkPathFillType) const override;
SkPath onAsPath(const SkSVGRenderContext&) const override;
SkRect onObjectBoundingBox(const SkSVGRenderContext&) const override;
private:
SkSVGPath();
using INHERITED = SkSVGShape;
};
#endif // SkSVGPath_DEFINED