• 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
PatternAttributes.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 PatternAttributes_h
23 #define PatternAttributes_h
24 
25 #if ENABLE(SVG)
26 
27 namespace WebCore
28 {
29  struct PatternAttributes {
30  PatternAttributes()
31  : m_x()
32  , m_y()
33  , m_width()
34  , m_height()
35  , m_boundingBoxMode(true)
36  , m_boundingBoxModeContent(false)
37  , m_patternContentElement(0)
38  , m_xSet(false)
39  , m_ySet(false)
40  , m_widthSet(false)
41  , m_heightSet(false)
42  , m_boundingBoxModeSet(false)
43  , m_boundingBoxModeContentSet(false)
44  , m_patternTransformSet(false)
45  , m_patternContentElementSet(false)
46  {
47  }
48 
49  SVGLength x() const { return m_x; }
50  SVGLength y() const { return m_y; }
51  SVGLength width() const { return m_width; }
52  SVGLength height() const { return m_height; }
53  bool boundingBoxMode() const { return m_boundingBoxMode; }
54  bool boundingBoxModeContent() const { return m_boundingBoxModeContent; }
55  AffineTransform patternTransform() const { return m_patternTransform; }
56  const SVGPatternElement* patternContentElement() const { return m_patternContentElement; }
57 
58  void setX(const SVGLength& value) { m_x = value; m_xSet = true; }
59  void setY(const SVGLength& value) { m_y = value; m_ySet = true; }
60  void setWidth(const SVGLength& value) { m_width = value; m_widthSet = true; }
61  void setHeight(const SVGLength& value) { m_height = value; m_heightSet = true; }
62  void setBoundingBoxMode(bool value) { m_boundingBoxMode = value; m_boundingBoxModeSet = true; }
63  void setBoundingBoxModeContent(bool value) { m_boundingBoxModeContent = value; m_boundingBoxModeContentSet = true; }
64  void setPatternTransform(const AffineTransform& value) { m_patternTransform = value; m_patternTransformSet = true; }
65  void setPatternContentElement(const SVGPatternElement* value) { m_patternContentElement = value; m_patternContentElementSet = true; }
66 
67  bool hasX() const { return m_xSet; }
68  bool hasY() const { return m_ySet; }
69  bool hasWidth() const { return m_widthSet; }
70  bool hasHeight() const { return m_heightSet; }
71  bool hasBoundingBoxMode() const { return m_boundingBoxModeSet; }
72  bool hasBoundingBoxModeContent() const { return m_boundingBoxModeContentSet; }
73  bool hasPatternTransform() const { return m_patternTransformSet; }
74  bool hasPatternContentElement() const { return m_patternContentElementSet; }
75 
76  private:
77  // Properties
78  SVGLength m_x;
79  SVGLength m_y;
80  SVGLength m_width;
81  SVGLength m_height;
82  bool m_boundingBoxMode;
83  bool m_boundingBoxModeContent;
84  AffineTransform m_patternTransform;
85  const SVGPatternElement* m_patternContentElement;
86 
87  // Property states
88  bool m_xSet : 1;
89  bool m_ySet : 1;
90  bool m_widthSet : 1;
91  bool m_heightSet : 1;
92  bool m_boundingBoxModeSet : 1;
93  bool m_boundingBoxModeContentSet : 1;
94  bool m_patternTransformSet : 1;
95  bool m_patternContentElementSet : 1;
96  };
97 
98 } // namespace WebCore
99 
100 #endif // ENABLE(SVG)
101 #endif
102 
103 // 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:22 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