KHTML
PatternAttributes.h
Go to the documentation of this file.
00001 /* 00002 Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> 00003 00004 This file is part of the KDE project 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef PatternAttributes_h 00023 #define PatternAttributes_h 00024 00025 #if ENABLE(SVG) 00026 00027 namespace WebCore 00028 { 00029 struct PatternAttributes { 00030 PatternAttributes() 00031 : m_x() 00032 , m_y() 00033 , m_width() 00034 , m_height() 00035 , m_boundingBoxMode(true) 00036 , m_boundingBoxModeContent(false) 00037 , m_patternContentElement(0) 00038 , m_xSet(false) 00039 , m_ySet(false) 00040 , m_widthSet(false) 00041 , m_heightSet(false) 00042 , m_boundingBoxModeSet(false) 00043 , m_boundingBoxModeContentSet(false) 00044 , m_patternTransformSet(false) 00045 , m_patternContentElementSet(false) 00046 { 00047 } 00048 00049 SVGLength x() const { return m_x; } 00050 SVGLength y() const { return m_y; } 00051 SVGLength width() const { return m_width; } 00052 SVGLength height() const { return m_height; } 00053 bool boundingBoxMode() const { return m_boundingBoxMode; } 00054 bool boundingBoxModeContent() const { return m_boundingBoxModeContent; } 00055 AffineTransform patternTransform() const { return m_patternTransform; } 00056 const SVGPatternElement* patternContentElement() const { return m_patternContentElement; } 00057 00058 void setX(const SVGLength& value) { m_x = value; m_xSet = true; } 00059 void setY(const SVGLength& value) { m_y = value; m_ySet = true; } 00060 void setWidth(const SVGLength& value) { m_width = value; m_widthSet = true; } 00061 void setHeight(const SVGLength& value) { m_height = value; m_heightSet = true; } 00062 void setBoundingBoxMode(bool value) { m_boundingBoxMode = value; m_boundingBoxModeSet = true; } 00063 void setBoundingBoxModeContent(bool value) { m_boundingBoxModeContent = value; m_boundingBoxModeContentSet = true; } 00064 void setPatternTransform(const AffineTransform& value) { m_patternTransform = value; m_patternTransformSet = true; } 00065 void setPatternContentElement(const SVGPatternElement* value) { m_patternContentElement = value; m_patternContentElementSet = true; } 00066 00067 bool hasX() const { return m_xSet; } 00068 bool hasY() const { return m_ySet; } 00069 bool hasWidth() const { return m_widthSet; } 00070 bool hasHeight() const { return m_heightSet; } 00071 bool hasBoundingBoxMode() const { return m_boundingBoxModeSet; } 00072 bool hasBoundingBoxModeContent() const { return m_boundingBoxModeContentSet; } 00073 bool hasPatternTransform() const { return m_patternTransformSet; } 00074 bool hasPatternContentElement() const { return m_patternContentElementSet; } 00075 00076 private: 00077 // Properties 00078 SVGLength m_x; 00079 SVGLength m_y; 00080 SVGLength m_width; 00081 SVGLength m_height; 00082 bool m_boundingBoxMode; 00083 bool m_boundingBoxModeContent; 00084 AffineTransform m_patternTransform; 00085 const SVGPatternElement* m_patternContentElement; 00086 00087 // Property states 00088 bool m_xSet : 1; 00089 bool m_ySet : 1; 00090 bool m_widthSet : 1; 00091 bool m_heightSet : 1; 00092 bool m_boundingBoxModeSet : 1; 00093 bool m_boundingBoxModeContentSet : 1; 00094 bool m_patternTransformSet : 1; 00095 bool m_patternContentElementSet : 1; 00096 }; 00097 00098 } // namespace WebCore 00099 00100 #endif // ENABLE(SVG) 00101 #endif 00102 00103 // vim:ts=4:noet
KDE 4.6 API Reference