| Index: experimental/svg/model/SkSVGShape.cpp
|
| diff --git a/experimental/svg/model/SkSVGShape.cpp b/experimental/svg/model/SkSVGShape.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d26eff482d7fa4190a0467e46bd3c40760e87498
|
| --- /dev/null
|
| +++ b/experimental/svg/model/SkSVGShape.cpp
|
| @@ -0,0 +1,25 @@
|
| +/*
|
| + * Copyright 2016 Google Inc.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +#include "SkSVGRenderContext.h"
|
| +#include "SkSVGShape.h"
|
| +
|
| +SkSVGShape::SkSVGShape(SkSVGTag t) : INHERITED(t) {}
|
| +
|
| +void SkSVGShape::onRender(SkCanvas* canvas, const SkSVGRenderContext& ctx) const {
|
| + if (const SkPaint* fillPaint = ctx.fillPaint()) {
|
| + this->onDraw(canvas, ctx.lengthContext(), *fillPaint);
|
| + }
|
| +
|
| + if (const SkPaint* strokePaint = ctx.strokePaint()) {
|
| + this->onDraw(canvas, ctx.lengthContext(), *strokePaint);
|
| + }
|
| +}
|
| +
|
| +void SkSVGShape::appendChild(sk_sp<SkSVGNode>) {
|
| + SkDebugf("cannot append child nodes to an SVG shape.\n");
|
| +}
|
|
|