don't discard iframe children.
[kdelibs.git] / khtml / svg / LinearGradientAttributes.h
blobe640c036e013ff18c87a3c7936e9b3eb6b542a0e
1 /*
2 Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
4 This file is part of the KDE project
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
22 #ifndef LinearGradientAttributes_h
23 #define LinearGradientAttributes_h
25 #include "GradientAttributes.h"
27 #if ENABLE(SVG)
29 namespace WebCore
31 struct LinearGradientAttributes : GradientAttributes {
32 LinearGradientAttributes()
33 : m_x1(0.0)
34 , m_y1(0.0)
35 , m_x2(1.0)
36 , m_y2(0.0)
37 , m_x1Set(false)
38 , m_y1Set(false)
39 , m_x2Set(false)
40 , m_y2Set(false)
44 double x1() const { return m_x1; }
45 double y1() const { return m_y1; }
46 double x2() const { return m_x2; }
47 double y2() const { return m_y2; }
49 void setX1(double value) { m_x1 = value; m_x1Set = true; }
50 void setY1(double value) { m_y1 = value; m_y1Set = true; }
51 void setX2(double value) { m_x2 = value; m_x2Set = true; }
52 void setY2(double value) { m_y2 = value; m_y2Set = true; }
54 bool hasX1() const { return m_x1Set; }
55 bool hasY1() const { return m_y1Set; }
56 bool hasX2() const { return m_x2Set; }
57 bool hasY2() const { return m_y2Set; }
59 private:
60 // Properties
61 double m_x1;
62 double m_y1;
63 double m_x2;
64 double m_y2;
66 // Property states
67 bool m_x1Set : 1;
68 bool m_y1Set : 1;
69 bool m_x2Set : 1;
70 bool m_y2Set : 1;
73 } // namespace WebCore
75 #endif // ENABLE(SVG)
76 #endif
78 // vim:ts=4:noet