| 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 SkSVGStop_DEFINED |
| 9 |
#define SkSVGStop_DEFINED |
| 10 |
|
| 11 |
#include "include/core/SkRefCnt.h" |
| 12 |
#include "include/private/base/SkAPI.h" |
| 13 |
#include "modules/svg/include/SkSVGHiddenContainer.h" |
| 14 |
#include "modules/svg/include/SkSVGNode.h" |
| 15 |
#include "modules/svg/include/SkSVGTypes.h" |
| 16 |
|
| 17 |
class SK_API SkSVGStop : public SkSVGHiddenContainer { |
| 18 |
public: |
| 19 |
static constexpr SkSVGTag tag = SkSVGTag::kStop; |
| 20 |
|
| 21 |
static sk_sp<SkSVGStop> Make() { |
| 22 |
return sk_sp<SkSVGStop>(new SkSVGStop()); |
| 23 |
} |
| 24 |
|
| 25 |
SVG_ATTR(Offset, SkSVGLength, SkSVGLength(0, SkSVGLength::Unit::kPercentage)) |
| 26 |
|
| 27 |
protected: |
| 28 |
bool parseAndSetAttribute(const char*, const char*) override; |
| 29 |
|
| 30 |
private: |
| 31 |
SkSVGStop(); |
| 32 |
|
| 33 |
using INHERITED = SkSVGHiddenContainer; |
| 34 |
}; |
| 35 |
|
| 36 |
#endif // SkSVGStop_DEFINED |