4241f5e0a8
This reverts commit e1af44498b
.
Reason for revert: breaking google3?
Original change's description:
> add guard to switch to SkPathTypes
>
> Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=robertphillips@google.com,kjlubick@google.com,fmalita@chromium.org,reed@google.com
Change-Id: If1fffb6310921ee6f213af000da793afcf62ab0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241560
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
47 lines
1.2 KiB
C++
47 lines
1.2 KiB
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 SkSVGCircle_DEFINED
|
|
#define SkSVGCircle_DEFINED
|
|
|
|
#include "experimental/svg/model/SkSVGShape.h"
|
|
#include "experimental/svg/model/SkSVGTypes.h"
|
|
|
|
struct SkPoint;
|
|
|
|
class SkSVGCircle final : public SkSVGShape {
|
|
public:
|
|
~SkSVGCircle() override = default;
|
|
static sk_sp<SkSVGCircle> Make() { return sk_sp<SkSVGCircle>(new SkSVGCircle()); }
|
|
|
|
void setCx(const SkSVGLength&);
|
|
void setCy(const SkSVGLength&);
|
|
void setR(const SkSVGLength&);
|
|
|
|
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:
|
|
SkSVGCircle();
|
|
|
|
// resolve and return the center and radius values
|
|
std::tuple<SkPoint, SkScalar> resolve(const SkSVGLengthContext&) const;
|
|
|
|
SkSVGLength fCx = SkSVGLength(0);
|
|
SkSVGLength fCy = SkSVGLength(0);
|
|
SkSVGLength fR = SkSVGLength(0);
|
|
|
|
typedef SkSVGShape INHERITED;
|
|
};
|
|
|
|
#endif // SkSVGCircle_DEFINED
|