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"
31 struct LinearGradientAttributes
: GradientAttributes
{
32 LinearGradientAttributes()
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
; }
73 } // namespace WebCore