xref: /aosp_15_r20/external/skia/modules/svg/src/SkSVGStop.cpp (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
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 #include "modules/svg/include/SkSVGStop.h"
9 
10 #include "modules/svg/include/SkSVGAttributeParser.h"
11 
SkSVGStop()12 SkSVGStop::SkSVGStop() : INHERITED(SkSVGTag::kStop) {}
13 
parseAndSetAttribute(const char * n,const char * v)14 bool SkSVGStop::parseAndSetAttribute(const char* n, const char* v) {
15     return INHERITED::parseAndSetAttribute(n, v) ||
16            this->setOffset(SkSVGAttributeParser::parse<SkSVGLength>("offset", n, v));
17 }
18