File indexing completed on 2024-04-28 15:24:38
0001 /* 0002 Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> 0003 2004, 2005, 2006 Rob Buis <buis@kde.org> 0004 0005 This file is part of the KDE project 0006 0007 This library is free software; you can redistribute it and/or 0008 modify it under the terms of the GNU Library General Public 0009 License as published by the Free Software Foundation; either 0010 version 2 of the License, or (at your option) any later version. 0011 0012 This library is distributed in the hope that it will be useful, 0013 but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0015 Library General Public License for more details. 0016 0017 You should have received a copy of the GNU Library General Public License 0018 along with this library; see the file COPYING.LIB. If not, write to 0019 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0020 Boston, MA 02110-1301, USA. 0021 */ 0022 0023 #ifndef SVGPathSeg_h 0024 #define SVGPathSeg_h 0025 0026 #if ENABLE(SVG) 0027 #include "PlatformString.h" 0028 #include "SVGNames.h" 0029 0030 #include <wtf/RefCounted.h> 0031 #include <wtf/PassRefPtr.h> 0032 0033 namespace WebCore 0034 { 0035 class SVGPathElement; 0036 class SVGStyledElement; 0037 0038 class SVGPathSeg : public RefCounted<SVGPathSeg> 0039 { 0040 public: 0041 virtual ~SVGPathSeg() { } 0042 0043 enum SVGPathSegType { 0044 PATHSEG_UNKNOWN = 0, 0045 PATHSEG_CLOSEPATH = 1, 0046 PATHSEG_MOVETO_ABS = 2, 0047 PATHSEG_MOVETO_REL = 3, 0048 PATHSEG_LINETO_ABS = 4, 0049 PATHSEG_LINETO_REL = 5, 0050 PATHSEG_CURVETO_CUBIC_ABS = 6, 0051 PATHSEG_CURVETO_CUBIC_REL = 7, 0052 PATHSEG_CURVETO_QUADRATIC_ABS = 8, 0053 PATHSEG_CURVETO_QUADRATIC_REL = 9, 0054 PATHSEG_ARC_ABS = 10, 0055 PATHSEG_ARC_REL = 11, 0056 PATHSEG_LINETO_HORIZONTAL_ABS = 12, 0057 PATHSEG_LINETO_HORIZONTAL_REL = 13, 0058 PATHSEG_LINETO_VERTICAL_ABS = 14, 0059 PATHSEG_LINETO_VERTICAL_REL = 15, 0060 PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16, 0061 PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17, 0062 PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18, 0063 PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19 0064 }; 0065 0066 virtual unsigned short pathSegType() const 0067 { 0068 return PATHSEG_UNKNOWN; 0069 } 0070 virtual String pathSegTypeAsLetter() const 0071 { 0072 return ""; 0073 } 0074 virtual String toString() const 0075 { 0076 return ""; 0077 } 0078 0079 const QualifiedName &associatedAttributeName() const 0080 { 0081 return SVGNames::dAttr; 0082 } 0083 0084 protected: 0085 SVGPathSeg() { } 0086 }; 0087 0088 } // namespace WebCore 0089 0090 #endif // ENABLE(SVG) 0091 #endif