aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/svg/parser/SkSVGStop.cpp
blob: 575feabe838c1b0024aca2fe57a10a99fcd77500 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * Copyright 2006 The Android Open Source Project
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */


#include "SkSVGStop.h"
#include "SkSVGParser.h"

const SkSVGAttribute SkSVGStop::gAttributes[] = {
    SVG_ATTRIBUTE(offset)
};

DEFINE_SVG_INFO(Stop)

void SkSVGStop::translate(SkSVGParser& parser, bool defState) {
    parser._startElement("color");
    INHERITED::translate(parser, defState);
    parser._addAttribute("color", parser.getPaintLast(SkSVGPaint::kStopColor));
    parser._endElement();
}