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

Side by Side Diff: Source/core/svg/SVGPathSegCurvetoCubic.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
« no previous file with comments | « Source/core/svg/SVGPathSegClosePath.h ('k') | Source/core/svg/SVGPathSegCurvetoCubicSmooth.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 SVGPathSegCurvetoCubic_h 21 #ifndef SVGPathSegCurvetoCubic_h
22 #define SVGPathSegCurvetoCubic_h 22 #define SVGPathSegCurvetoCubic_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 SVGPathSegCurvetoCubic : public SVGPathSegWithContext { 28 class SVGPathSegCurvetoCubic : public SVGPathSegWithContext {
29 public: 29 public:
30 SVGPathSegCurvetoCubic(SVGPathElement* element, SVGPathSegRole role, float x , float y, float x1, float y1, float x2, float y2) 30 SVGPathSegCurvetoCubic(SVGPathElement* element, SVGPathSegRole role, float x , float y, float x1, float y1, float x2, float y2)
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 , m_x2(x2) 36 , m_x2(x2)
37 , m_y2(y2) 37 , m_y2(y2)
38 { 38 {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 public: 93 public:
94 static PassRefPtr<SVGPathSegCurvetoCubicAbs> create(SVGPathElement* element, SVGPathSegRole role, float x, float y, float x1, float y1, float x2, float y2) 94 static PassRefPtr<SVGPathSegCurvetoCubicAbs> create(SVGPathElement* element, SVGPathSegRole role, float x, float y, float x1, float y1, float x2, float y2)
95 { 95 {
96 return adoptRef(new SVGPathSegCurvetoCubicAbs(element, role, x, y, x1, y 1, x2, y2)); 96 return adoptRef(new SVGPathSegCurvetoCubicAbs(element, role, x, y, x1, y 1, x2, y2));
97 } 97 }
98 98
99 private: 99 private:
100 SVGPathSegCurvetoCubicAbs(SVGPathElement* element, SVGPathSegRole role, floa t x, float y, float x1, float y1, float x2, float y2) 100 SVGPathSegCurvetoCubicAbs(SVGPathElement* element, SVGPathSegRole role, floa t x, float y, float x1, float y1, float x2, float y2)
101 : SVGPathSegCurvetoCubic(element, role, x, y, x1, y1, x2, y2) 101 : SVGPathSegCurvetoCubic(element, role, x, y, x1, y1, x2, y2)
102 { 102 {
103 ScriptWrappable::init(this);
103 } 104 }
104 105
105 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_AB S; } 106 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_AB S; }
106 virtual String pathSegTypeAsLetter() const { return "C"; } 107 virtual String pathSegTypeAsLetter() const { return "C"; }
107 }; 108 };
108 109
109 class SVGPathSegCurvetoCubicRel : public SVGPathSegCurvetoCubic { 110 class SVGPathSegCurvetoCubicRel : public SVGPathSegCurvetoCubic {
110 public: 111 public:
111 static PassRefPtr<SVGPathSegCurvetoCubicRel> create(SVGPathElement* element, SVGPathSegRole role, float x, float y, float x1, float y1, float x2, float y2) 112 static PassRefPtr<SVGPathSegCurvetoCubicRel> create(SVGPathElement* element, SVGPathSegRole role, float x, float y, float x1, float y1, float x2, float y2)
112 { 113 {
113 return adoptRef(new SVGPathSegCurvetoCubicRel(element, role, x, y, x1, y 1, x2, y2)); 114 return adoptRef(new SVGPathSegCurvetoCubicRel(element, role, x, y, x1, y 1, x2, y2));
114 } 115 }
115 116
116 private: 117 private:
117 SVGPathSegCurvetoCubicRel(SVGPathElement* element, SVGPathSegRole role, floa t x, float y, float x1, float y1, float x2, float y2) 118 SVGPathSegCurvetoCubicRel(SVGPathElement* element, SVGPathSegRole role, floa t x, float y, float x1, float y1, float x2, float y2)
118 : SVGPathSegCurvetoCubic(element, role, x, y, x1, y1, x2, y2) 119 : SVGPathSegCurvetoCubic(element, role, x, y, x1, y1, x2, y2)
119 { 120 {
121 ScriptWrappable::init(this);
120 } 122 }
121 123
122 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_RE L; } 124 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_RE L; }
123 virtual String pathSegTypeAsLetter() const { return "c"; } 125 virtual String pathSegTypeAsLetter() const { return "c"; }
124 }; 126 };
125 127
126 } // namespace WebCore 128 } // namespace WebCore
127 129
128 #endif 130 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGPathSegClosePath.h ('k') | Source/core/svg/SVGPathSegCurvetoCubicSmooth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698