OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright 2016 Google Inc. |
| 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. |
| 6 */ |
| 7 |
| 8 #ifndef SkSVGEllipse_DEFINED |
| 9 #define SkSVGEllipse_DEFINED |
| 10 |
| 11 #include "SkSVGShape.h" |
| 12 #include "SkSVGTypes.h" |
| 13 |
| 14 class SkSVGEllipse final : public SkSVGShape { |
| 15 public: |
| 16 virtual ~SkSVGEllipse() = default; |
| 17 static sk_sp<SkSVGEllipse> Make() { return sk_sp<SkSVGEllipse>(new SkSVGElli
pse()); } |
| 18 |
| 19 void setCx(const SkSVGLength&); |
| 20 void setCy(const SkSVGLength&); |
| 21 void setRx(const SkSVGLength&); |
| 22 void setRy(const SkSVGLength&); |
| 23 |
| 24 protected: |
| 25 void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override; |
| 26 |
| 27 void onDraw(SkCanvas*, const SkSVGLengthContext&, const SkPaint&) const over
ride; |
| 28 |
| 29 private: |
| 30 SkSVGEllipse(); |
| 31 |
| 32 SkSVGLength fCx = SkSVGLength(0); |
| 33 SkSVGLength fCy = SkSVGLength(0); |
| 34 SkSVGLength fRx = SkSVGLength(0); |
| 35 SkSVGLength fRy = SkSVGLength(0); |
| 36 |
| 37 typedef SkSVGShape INHERITED; |
| 38 }; |
| 39 |
| 40 #endif // SkSVGEllipse_DEFINED |
OLD | NEW |