2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2008 Rob Buis <buis@kde.org>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
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
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef SVGPathSegCurvetoCubicSmooth_h
22 #define SVGPathSegCurvetoCubicSmooth_h
26 #include "PlatformString.h"
27 #include "SVGPathSeg.h"
31 class SVGPathSegCurvetoCubicSmooth : public SVGPathSeg {
33 SVGPathSegCurvetoCubicSmooth(float x, float y, float x2, float y2)
41 void setX(float x) { m_x = x; }
42 float x() const { return m_x; }
44 void setY(float y) { m_y = y; }
45 float y() const { return m_y; }
47 void setX2(float x2) { m_x2 = x2; }
48 float x2() const { return m_x2; }
50 void setY2(float y2) { m_y2 = y2; }
51 float y2() const { return m_y2; }
60 class SVGPathSegCurvetoCubicSmoothAbs : public SVGPathSegCurvetoCubicSmooth {
62 static PassRefPtr<SVGPathSegCurvetoCubicSmoothAbs> create(float x, float y, float x2, float y2) { return adoptRef(new SVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2)); }
65 SVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2, float y2);
67 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; }
68 virtual String pathSegTypeAsLetter() const { return "S"; }
71 class SVGPathSegCurvetoCubicSmoothRel : public SVGPathSegCurvetoCubicSmooth {
73 static PassRefPtr<SVGPathSegCurvetoCubicSmoothRel> create(float x, float y, float x2, float y2) { return adoptRef(new SVGPathSegCurvetoCubicSmoothRel(x, y, x2, y2)); }
76 SVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2, float y2);
78 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_REL; }
79 virtual String pathSegTypeAsLetter() const { return "s"; }
82 } // namespace WebCore