Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(617)

Side by Side Diff: src/svg/parser/SkSVGRadialGradient.cpp

Issue 2154193003: Delete the legacy SVG parser (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/svg/parser/SkSVGRadialGradient.h ('k') | src/svg/parser/SkSVGRect.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2006 The Android Open Source Project
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
9 #include "SkSVGRadialGradient.h"
10 #include "SkSVGParser.h"
11
12 const SkSVGAttribute SkSVGRadialGradient::gAttributes[] = {
13 SVG_ATTRIBUTE(cx),
14 SVG_ATTRIBUTE(cy),
15 SVG_ATTRIBUTE(fx),
16 SVG_ATTRIBUTE(fy),
17 SVG_ATTRIBUTE(gradientTransform),
18 SVG_ATTRIBUTE(gradientUnits),
19 SVG_ATTRIBUTE(r)
20 };
21
22 DEFINE_SVG_INFO(RadialGradient)
23
24 void SkSVGRadialGradient::translate(SkSVGParser& parser, bool defState) {
25 if (fMatrixID.size() == 0)
26 parser.translateMatrix(f_gradientTransform, &fMatrixID);
27 parser._startElement("radialGradient");
28 if (fMatrixID.size() > 0)
29 parser._addAttribute("matrix", fMatrixID);
30 INHERITED::translateGradientUnits(f_gradientUnits);
31 SkString center;
32 center.appendUnichar('[');
33 center.append(f_cx);
34 center.appendUnichar(',');
35 center.append(f_cy);
36 center.appendUnichar(']');
37 parser._addAttribute("center", center);
38 parser._addAttribute("radius", f_r);
39 INHERITED::translate(parser, defState);
40 parser._endElement();
41 }
OLDNEW
« no previous file with comments | « src/svg/parser/SkSVGRadialGradient.h ('k') | src/svg/parser/SkSVGRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698