3e7af41224
This reverts commit 3a50981a83
.
Reason for revert: chrome win build found compile-problem in xpsdevice
Original change's description:
> switch to new filltype for SkPath
>
> Change-Id: I7793324a9acf4afb0eb38c1e20fbb38eac25d636
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256102
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=fmalita@chromium.org,reed@google.com
Change-Id: Iacb3566da61c2512b9bd6b7e42b592febc85e031
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256530
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
38 lines
947 B
C++
38 lines
947 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 "experimental/svg/model/SkSVGShape.h"
|
|
#include "include/core/SkPath.h"
|
|
|
|
class SkSVGPath final : public SkSVGShape {
|
|
public:
|
|
~SkSVGPath() override = default;
|
|
static sk_sp<SkSVGPath> Make() { return sk_sp<SkSVGPath>(new SkSVGPath()); }
|
|
|
|
void setPath(const SkPath& path) { fPath = path; }
|
|
|
|
protected:
|
|
void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override;
|
|
|
|
void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&,
|
|
SkPath::FillType) const override;
|
|
|
|
SkPath onAsPath(const SkSVGRenderContext&) const override;
|
|
|
|
private:
|
|
SkSVGPath();
|
|
|
|
mutable SkPath fPath; // mutated in onDraw(), to apply inherited fill types.
|
|
|
|
typedef SkSVGShape INHERITED;
|
|
};
|
|
|
|
#endif // SkSVGPath_DEFINED
|