| 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 |
|
| 12 |
SkSVGStop::SkSVGStop() : INHERITED(SkSVGTag::kStop) {} |
| 13 |
|
| 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 |
} |