• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • khtml
  • svg
GradientAttributes.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
3 
4  This file is part of the KDE project
5 
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.
10 
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.
15 
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.
20 */
21 
22 #ifndef GradientAttributes_h
23 #define GradientAttributes_h
24 
25 #if ENABLE(SVG)
26 
27 namespace WebCore
28 {
29  struct GradientAttributes {
30  GradientAttributes()
31  : m_spreadMethod(SPREADMETHOD_PAD)
32  , m_boundingBoxMode(true)
33  , m_spreadMethodSet(false)
34  , m_boundingBoxModeSet(false)
35  , m_gradientTransformSet(false)
36  , m_stopsSet(false)
37  {
38  }
39 
40  SVGGradientSpreadMethod spreadMethod() const { return m_spreadMethod; }
41  bool boundingBoxMode() const { return m_boundingBoxMode; }
42  AffineTransform gradientTransform() const { return m_gradientTransform; }
43  const Vector<SVGGradientStop>& stops() const { return m_stops; }
44 
45  void setSpreadMethod(SVGGradientSpreadMethod value) { m_spreadMethod = value; m_spreadMethodSet = true; }
46  void setBoundingBoxMode(bool value) { m_boundingBoxMode = value; m_boundingBoxModeSet = true; }
47  void setGradientTransform(const AffineTransform& value) { m_gradientTransform = value; m_gradientTransformSet = true; }
48  void setStops(const Vector<SVGGradientStop>& value) { m_stops = value; m_stopsSet = true; }
49 
50  bool hasSpreadMethod() const { return m_spreadMethodSet; }
51  bool hasBoundingBoxMode() const { return m_boundingBoxModeSet; }
52  bool hasGradientTransform() const { return m_gradientTransformSet; }
53  bool hasStops() const { return m_stopsSet; }
54 
55  private:
56  // Properties
57  SVGGradientSpreadMethod m_spreadMethod;
58  bool m_boundingBoxMode;
59  AffineTransform m_gradientTransform;
60  Vector<SVGGradientStop> m_stops;
61 
62  // Property states
63  bool m_spreadMethodSet : 1;
64  bool m_boundingBoxModeSet : 1;
65  bool m_gradientTransformSet : 1;
66  bool m_stopsSet : 1;
67  };
68 
69 } // namespace WebCore
70 
71 #endif // ENABLE(SVG)
72 #endif
73 
74 // vim:ts=4:noet
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal