KHTML
RadialGradientAttributes.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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
00066 double m_cx;
00067 double m_cy;
00068 double m_r;
00069 double m_fx;
00070 double m_fy;
00071
00072
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 }
00081
00082 #endif // ENABLE(SVG)
00083 #endif
00084
00085