blob: 58bf57b7642049a22b39d3386a402670d3bf37ea [file] [log] [blame]
Florin Malitab3418102020-10-15 18:10:29 -04001/*
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
14class SkSVGLengthContext;
15
16class SkSVGStop : public SkSVGHiddenContainer {
17public:
Florin Malitab3418102020-10-15 18:10:29 -040018 static sk_sp<SkSVGStop> Make() {
19 return sk_sp<SkSVGStop>(new SkSVGStop());
20 }
21
Florin Malitab3418102020-10-15 18:10:29 -040022
Tyler Denniston627c6d22021-02-08 13:30:45 -050023 SVG_ATTR(Offset, SkSVGLength, SkSVGLength(0, SkSVGLength::Unit::kPercentage))
Florin Malitab3418102020-10-15 18:10:29 -040024
25protected:
Tyler Denniston627c6d22021-02-08 13:30:45 -050026 bool parseAndSetAttribute(const char*, const char*) override;
Florin Malitab3418102020-10-15 18:10:29 -040027
28private:
29 SkSVGStop();
30
Florin Malitab3418102020-10-15 18:10:29 -040031 using INHERITED = SkSVGHiddenContainer;
32};
33
34#endif // SkSVGStop_DEFINED