Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 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 "modules/svg/include/SkSVGHiddenContainer.h" |
| 12 | #include "modules/svg/include/SkSVGTypes.h" |
| 13 | |
| 14 | class SkSVGLengthContext; |
| 15 | |
| 16 | class SkSVGStop : public SkSVGHiddenContainer { |
| 17 | public: |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 18 | static sk_sp<SkSVGStop> Make() { |
| 19 | return sk_sp<SkSVGStop>(new SkSVGStop()); |
| 20 | } |
| 21 | |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 22 | |
Tyler Denniston | 627c6d2 | 2021-02-08 13:30:45 -0500 | [diff] [blame] | 23 | SVG_ATTR(Offset, SkSVGLength, SkSVGLength(0, SkSVGLength::Unit::kPercentage)) |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 24 | |
| 25 | protected: |
Tyler Denniston | 627c6d2 | 2021-02-08 13:30:45 -0500 | [diff] [blame] | 26 | bool parseAndSetAttribute(const char*, const char*) override; |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 27 | |
| 28 | private: |
| 29 | SkSVGStop(); |
| 30 | |
Florin Malita | b341810 | 2020-10-15 18:10:29 -0400 | [diff] [blame] | 31 | using INHERITED = SkSVGHiddenContainer; |
| 32 | }; |
| 33 | |
| 34 | #endif // SkSVGStop_DEFINED |