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>
55 lines
1.4 KiB
C++
55 lines
1.4 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 SkSVGRect_DEFINED
|
|
#define SkSVGRect_DEFINED
|
|
|
|
#include "experimental/svg/model/SkSVGShape.h"
|
|
#include "experimental/svg/model/SkSVGTypes.h"
|
|
|
|
class SkRRect;
|
|
|
|
class SkSVGRect final : public SkSVGShape {
|
|
public:
|
|
~SkSVGRect() override = default;
|
|
static sk_sp<SkSVGRect> Make() { return sk_sp<SkSVGRect>(new SkSVGRect()); }
|
|
|
|
void setX(const SkSVGLength&);
|
|
void setY(const SkSVGLength&);
|
|
void setWidth(const SkSVGLength&);
|
|
void setHeight(const SkSVGLength&);
|
|
void setRx(const SkSVGLength&);
|
|
void setRy(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:
|
|
SkSVGRect();
|
|
|
|
SkRRect resolve(const SkSVGLengthContext&) const;
|
|
|
|
SkSVGLength fX = SkSVGLength(0);
|
|
SkSVGLength fY = SkSVGLength(0);
|
|
SkSVGLength fWidth = SkSVGLength(0);
|
|
SkSVGLength fHeight = SkSVGLength(0);
|
|
|
|
// The x radius for rounded rects.
|
|
SkSVGLength fRx = SkSVGLength(0);
|
|
// The y radius for rounded rects.
|
|
SkSVGLength fRy = SkSVGLength(0);
|
|
|
|
typedef SkSVGShape INHERITED;
|
|
};
|
|
|
|
#endif // SkSVGRect_DEFINED
|