KHTML
SVGPathSegCurvetoCubicSmooth.h
Go to the documentation of this file.
00001 /* 00002 Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> 00003 2004, 2005, 2006 Rob Buis <buis@kde.org> 00004 00005 This file is part of the KDE project 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00020 Boston, MA 02110-1301, USA. 00021 */ 00022 00023 #ifndef SVGPathSegCurvetoCubicSmooth_h 00024 #define SVGPathSegCurvetoCubicSmooth_h 00025 00026 #if ENABLE(SVG) 00027 00028 #include "SVGPathSeg.h" 00029 00030 namespace WebCore { 00031 00032 class SVGPathSegCurvetoCubicSmoothAbs : public SVGPathSeg { 00033 public: 00034 static PassRefPtr<SVGPathSegCurvetoCubicSmoothAbs> create(float x, float y, float x2, float y2) { return adoptRef(new SVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2)); } 00035 virtual ~SVGPathSegCurvetoCubicSmoothAbs(); 00036 00037 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; } 00038 virtual String pathSegTypeAsLetter() const { return "S"; } 00039 virtual String toString() const { return String::format("S %.6lg %.6lg %.6lg %.6lg", m_x2, m_y2, m_x, m_y); } 00040 00041 void setX(float); 00042 float x() const; 00043 00044 void setY(float); 00045 float y() const; 00046 00047 void setX2(float); 00048 float x2() const; 00049 00050 void setY2(float); 00051 float y2() const; 00052 00053 private: 00054 SVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2, float y2); 00055 00056 float m_x; 00057 float m_y; 00058 float m_x2; 00059 float m_y2; 00060 }; 00061 00062 class SVGPathSegCurvetoCubicSmoothRel : public SVGPathSeg { 00063 public: 00064 static PassRefPtr<SVGPathSegCurvetoCubicSmoothRel> create(float x, float y, float x2, float y2) { return adoptRef(new SVGPathSegCurvetoCubicSmoothRel(x, y, x2, y2)); } 00065 virtual ~SVGPathSegCurvetoCubicSmoothRel(); 00066 00067 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_REL; } 00068 virtual String pathSegTypeAsLetter() const { return "s"; } 00069 virtual String toString() const { return String::format("s %.6lg %.6lg %.6lg %.6lg", m_x2, m_y2, m_x, m_y); } 00070 00071 void setX(float); 00072 float x() const; 00073 00074 void setY(float); 00075 float y() const; 00076 00077 void setX2(float); 00078 float x2() const; 00079 00080 void setY2(float); 00081 float y2() const; 00082 00083 private: 00084 SVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2, float y2); 00085 00086 float m_x; 00087 float m_y; 00088 float m_x2; 00089 float m_y2; 00090 }; 00091 00092 } // namespace WebCore 00093 00094 #endif // ENABLE(SVG) 00095 #endif 00096 00097 // vim:ts=4:noet
KDE 4.6 API Reference