fix tricky regression noticed by Vyacheslav Tokarev on Google Reader.
[kdelibs.git] / khtml / svg / SVGPaint.h
blob4d9a276052f47a1035e654f2603754d3f8e7952e
1 /*
2 Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
3 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmial.com)
6 This file is part of the KDE project
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either
11 version 2 of the License, or (at your option) any later version.
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Library General Public License for more details.
18 You should have received a copy of the GNU Library General Public License
19 along with this library; see the file COPYING.LIB. If not, write to
20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA.
24 #ifndef SVGPaint_h
25 #define SVGPaint_h
26 #if ENABLE(SVG)
28 #include "SVGColor.h"
30 namespace WebCore {
32 class SVGPaint : public SVGColor {
33 public:
34 enum SVGPaintType {
35 SVG_PAINTTYPE_UNKNOWN = 0,
36 SVG_PAINTTYPE_RGBCOLOR = 1,
37 SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2,
38 SVG_PAINTTYPE_NONE = 101,
39 SVG_PAINTTYPE_CURRENTCOLOR = 102,
40 SVG_PAINTTYPE_URI_NONE = 103,
41 SVG_PAINTTYPE_URI_CURRENTCOLOR = 104,
42 SVG_PAINTTYPE_URI_RGBCOLOR = 105,
43 SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106,
44 SVG_PAINTTYPE_URI = 107
47 SVGPaint();
48 SVGPaint(const String& uri);
49 SVGPaint(SVGPaintType);
50 SVGPaint(SVGPaintType, const String& uri, const String& rgbPaint = String(), const String& iccPaint = String());
51 SVGPaint(const Color& c);
52 SVGPaint(const String& uri, const Color& c);
53 virtual ~SVGPaint();
55 // 'SVGPaint' functions
56 SVGPaintType paintType() const { return m_paintType; }
57 String uri() const;
59 void setUri(const String&);
60 void setPaint(SVGPaintType, const String& uri, const String& rgbPaint, const String& iccPaint, ExceptionCode&);
62 virtual String cssText() const;
64 static SVGPaint* defaultFill();
65 static SVGPaint* defaultStroke();
67 virtual bool isSVGPaint() const { return true; }
69 // KHTML compat
70 virtual unsigned short cssValueType() const { return DOM::CSSValue::CSS_CUSTOM; }
71 private:
72 SVGPaintType m_paintType;
73 String m_uri;
76 } // namespace WebCore
78 #endif // ENABLE(SVG)
79 #endif // SVGPaint_h
81 // vim:ts=4