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

Side by Side Diff: Source/core/svg/SVGPathSegCurvetoQuadratic.h

Issue 15492007: Make SVG objects ScriptWrappable. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix indent Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21 #ifndef SVGPathSegCurvetoQuadratic_h 21 #ifndef SVGPathSegCurvetoQuadratic_h
22 #define SVGPathSegCurvetoQuadratic_h 22 #define SVGPathSegCurvetoQuadratic_h
23 23
24 #include "core/svg/SVGPathSegWithContext.h" 24 #include "core/svg/SVGPathSegWithContext.h"
25 25
26 namespace WebCore { 26 namespace WebCore {
27 27
28 class SVGPathSegCurvetoQuadratic : public SVGPathSegWithContext { 28 class SVGPathSegCurvetoQuadratic : public SVGPathSegWithContext {
29 public: 29 public:
30 SVGPathSegCurvetoQuadratic(SVGPathElement* element, SVGPathSegRole role, flo at x, float y, float x1, float y1) 30 SVGPathSegCurvetoQuadratic(SVGPathElement* element, SVGPathSegRole role, flo at x, float y, float x1, float y1)
31 : SVGPathSegWithContext(element, role) 31 : SVGPathSegWithContext(element, role)
32 , m_x(x) 32 , m_x(x)
33 , m_y(y) 33 , m_y(y)
34 , m_x1(x1) 34 , m_x1(x1)
35 , m_y1(y1) 35 , m_y1(y1)
36 { 36 {
37 } 37 }
38 38
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 public: 75 public:
76 static PassRefPtr<SVGPathSegCurvetoQuadraticAbs> create(SVGPathElement* elem ent, SVGPathSegRole role, float x, float y, float x1, float y1) 76 static PassRefPtr<SVGPathSegCurvetoQuadraticAbs> create(SVGPathElement* elem ent, SVGPathSegRole role, float x, float y, float x1, float y1)
77 { 77 {
78 return adoptRef(new SVGPathSegCurvetoQuadraticAbs(element, role, x, y, x 1, y1)); 78 return adoptRef(new SVGPathSegCurvetoQuadraticAbs(element, role, x, y, x 1, y1));
79 } 79 }
80 80
81 private: 81 private:
82 SVGPathSegCurvetoQuadraticAbs(SVGPathElement* element, SVGPathSegRole role, float x, float y, float x1, float y1) 82 SVGPathSegCurvetoQuadraticAbs(SVGPathElement* element, SVGPathSegRole role, float x, float y, float x1, float y1)
83 : SVGPathSegCurvetoQuadratic(element, role, x, y, x1, y1) 83 : SVGPathSegCurvetoQuadratic(element, role, x, y, x1, y1)
84 { 84 {
85 ScriptWrappable::init(this);
85 } 86 }
86 87
87 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATI C_ABS; } 88 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATI C_ABS; }
88 virtual String pathSegTypeAsLetter() const { return "Q"; } 89 virtual String pathSegTypeAsLetter() const { return "Q"; }
89 }; 90 };
90 91
91 class SVGPathSegCurvetoQuadraticRel : public SVGPathSegCurvetoQuadratic { 92 class SVGPathSegCurvetoQuadraticRel : public SVGPathSegCurvetoQuadratic {
92 public: 93 public:
93 static PassRefPtr<SVGPathSegCurvetoQuadraticRel> create(SVGPathElement* elem ent, SVGPathSegRole role, float x, float y, float x1, float y1) 94 static PassRefPtr<SVGPathSegCurvetoQuadraticRel> create(SVGPathElement* elem ent, SVGPathSegRole role, float x, float y, float x1, float y1)
94 { 95 {
95 return adoptRef(new SVGPathSegCurvetoQuadraticRel(element, role, x, y, x 1, y1)); 96 return adoptRef(new SVGPathSegCurvetoQuadraticRel(element, role, x, y, x 1, y1));
96 } 97 }
97 98
98 private: 99 private:
99 SVGPathSegCurvetoQuadraticRel(SVGPathElement* element, SVGPathSegRole role, float x, float y, float x1, float y1) 100 SVGPathSegCurvetoQuadraticRel(SVGPathElement* element, SVGPathSegRole role, float x, float y, float x1, float y1)
100 : SVGPathSegCurvetoQuadratic(element, role, x, y, x1, y1) 101 : SVGPathSegCurvetoQuadratic(element, role, x, y, x1, y1)
101 { 102 {
103 ScriptWrappable::init(this);
102 } 104 }
103 105
104 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATI C_REL; } 106 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATI C_REL; }
105 virtual String pathSegTypeAsLetter() const { return "q"; } 107 virtual String pathSegTypeAsLetter() const { return "q"; }
106 }; 108 };
107 109
108 } // namespace WebCore 110 } // namespace WebCore
109 111
110 #endif 112 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGPathSegCurvetoCubicSmooth.h ('k') | Source/core/svg/SVGPathSegCurvetoQuadraticSmooth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698