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.
32 class SVGPaint
: public SVGColor
{
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
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
);
55 // 'SVGPaint' functions
56 SVGPaintType
paintType() const { return m_paintType
; }
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; }
70 virtual unsigned short cssValueType() const { return DOM::CSSValue::CSS_CUSTOM
; }
72 SVGPaintType m_paintType
;
76 } // namespace WebCore