KHTML
RadialGradientAttributes.h
Go to the documentation of this file.
00001 /* 00002 Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 00003 00004 This file is part of the KDE project 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef RadialGradientAttributes_h 00023 #define RadialGradientAttributes_h 00024 00025 #include "GradientAttributes.h" 00026 00027 #if ENABLE(SVG) 00028 00029 namespace WebCore 00030 { 00031 struct RadialGradientAttributes : GradientAttributes { 00032 RadialGradientAttributes() 00033 : m_cx(0.5) 00034 , m_cy(0.5) 00035 , m_r(0.5) 00036 , m_fx(0.0) 00037 , m_fy(0.0) 00038 , m_cxSet(false) 00039 , m_cySet(false) 00040 , m_rSet(false) 00041 , m_fxSet(false) 00042 , m_fySet(false) 00043 { 00044 } 00045 00046 double cx() const { return m_cx; } 00047 double cy() const { return m_cy; } 00048 double r() const { return m_r; } 00049 double fx() const { return m_fx; } 00050 double fy() const { return m_fy; } 00051 00052 void setCx(double value) { m_cx = value; m_cxSet = true; } 00053 void setCy(double value) { m_cy = value; m_cySet = true; } 00054 void setR(double value) { m_r = value; m_rSet = true; } 00055 void setFx(double value) { m_fx = value; m_fxSet = true; } 00056 void setFy(double value) { m_fy = value; m_fySet = true; } 00057 00058 bool hasCx() const { return m_cxSet; } 00059 bool hasCy() const { return m_cySet; } 00060 bool hasR() const { return m_rSet; } 00061 bool hasFx() const { return m_fxSet; } 00062 bool hasFy() const { return m_fySet; } 00063 00064 private: 00065 // Properties 00066 double m_cx; 00067 double m_cy; 00068 double m_r; 00069 double m_fx; 00070 double m_fy; 00071 00072 // Property states 00073 bool m_cxSet : 1; 00074 bool m_cySet : 1; 00075 bool m_rSet : 1; 00076 bool m_fxSet : 1; 00077 bool m_fySet : 1; 00078 }; 00079 00080 } // namespace WebCore 00081 00082 #endif // ENABLE(SVG) 00083 #endif 00084 00085 // vim:ts=4:noet
KDE 4.6 API Reference