File indexing completed on 2024-04-28 11:39:19
0001 /* 0002 Copyright (C) 2004, 2005, 2006 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 #include "wtf/Platform.h" 0024 0025 #if ENABLE(SVG) 0026 #include "SVGPathSegArc.h" 0027 0028 #include "SVGStyledElement.h" 0029 0030 namespace WebCore 0031 { 0032 0033 SVGPathSegArcAbs::SVGPathSegArcAbs(float x, float y, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag) 0034 : SVGPathSeg() 0035 , m_x(x) 0036 , m_y(y) 0037 , m_r1(r1) 0038 , m_r2(r2) 0039 , m_angle(angle) 0040 , m_largeArcFlag(largeArcFlag) 0041 , m_sweepFlag(sweepFlag) 0042 { 0043 } 0044 0045 SVGPathSegArcAbs::~SVGPathSegArcAbs() 0046 { 0047 } 0048 0049 void SVGPathSegArcAbs::setX(float x) 0050 { 0051 m_x = x; 0052 } 0053 0054 float SVGPathSegArcAbs::x() const 0055 { 0056 return m_x; 0057 } 0058 0059 void SVGPathSegArcAbs::setY(float y) 0060 { 0061 m_y = y; 0062 } 0063 0064 float SVGPathSegArcAbs::y() const 0065 { 0066 return m_y; 0067 } 0068 0069 void SVGPathSegArcAbs::setR1(float r1) 0070 { 0071 m_r1 = r1; 0072 } 0073 0074 float SVGPathSegArcAbs::r1() const 0075 { 0076 return m_r1; 0077 } 0078 0079 void SVGPathSegArcAbs::setR2(float r2) 0080 { 0081 m_r2 = r2; 0082 } 0083 0084 float SVGPathSegArcAbs::r2() const 0085 { 0086 return m_r2; 0087 } 0088 0089 void SVGPathSegArcAbs::setAngle(float angle) 0090 { 0091 m_angle = angle; 0092 } 0093 0094 float SVGPathSegArcAbs::angle() const 0095 { 0096 return m_angle; 0097 } 0098 0099 void SVGPathSegArcAbs::setLargeArcFlag(bool largeArcFlag) 0100 { 0101 m_largeArcFlag = largeArcFlag; 0102 } 0103 0104 bool SVGPathSegArcAbs::largeArcFlag() const 0105 { 0106 return m_largeArcFlag; 0107 } 0108 0109 void SVGPathSegArcAbs::setSweepFlag(bool sweepFlag) 0110 { 0111 m_sweepFlag = sweepFlag; 0112 } 0113 0114 bool SVGPathSegArcAbs::sweepFlag() const 0115 { 0116 return m_sweepFlag; 0117 } 0118 0119 SVGPathSegArcRel::SVGPathSegArcRel(float x, float y, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag) 0120 : SVGPathSeg() 0121 , m_x(x) 0122 , m_y(y) 0123 , m_r1(r1) 0124 , m_r2(r2) 0125 , m_angle(angle) 0126 , m_largeArcFlag(largeArcFlag) 0127 , m_sweepFlag(sweepFlag) 0128 { 0129 } 0130 0131 SVGPathSegArcRel::~SVGPathSegArcRel() 0132 { 0133 } 0134 0135 void SVGPathSegArcRel::setX(float x) 0136 { 0137 m_x = x; 0138 } 0139 0140 float SVGPathSegArcRel::x() const 0141 { 0142 return m_x; 0143 } 0144 0145 void SVGPathSegArcRel::setY(float y) 0146 { 0147 m_y = y; 0148 } 0149 0150 float SVGPathSegArcRel::y() const 0151 { 0152 return m_y; 0153 } 0154 0155 void SVGPathSegArcRel::setR1(float r1) 0156 { 0157 m_r1 = r1; 0158 } 0159 0160 float SVGPathSegArcRel::r1() const 0161 { 0162 return m_r1; 0163 } 0164 0165 void SVGPathSegArcRel::setR2(float r2) 0166 { 0167 m_r2 = r2; 0168 } 0169 0170 float SVGPathSegArcRel::r2() const 0171 { 0172 return m_r2; 0173 } 0174 0175 void SVGPathSegArcRel::setAngle(float angle) 0176 { 0177 m_angle = angle; 0178 } 0179 0180 float SVGPathSegArcRel::angle() const 0181 { 0182 return m_angle; 0183 } 0184 0185 void SVGPathSegArcRel::setLargeArcFlag(bool largeArcFlag) 0186 { 0187 m_largeArcFlag = largeArcFlag; 0188 } 0189 0190 bool SVGPathSegArcRel::largeArcFlag() const 0191 { 0192 return m_largeArcFlag; 0193 } 0194 0195 void SVGPathSegArcRel::setSweepFlag(bool sweepFlag) 0196 { 0197 m_sweepFlag = sweepFlag; 0198 } 0199 0200 bool SVGPathSegArcRel::sweepFlag() const 0201 { 0202 return m_sweepFlag; 0203 } 0204 0205 } 0206 0207 #endif // ENABLE(SVG) 0208