KHTML
SVGPaint.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef SVGPaint_h
00025 #define SVGPaint_h
00026 #if ENABLE(SVG)
00027
00028 #include "SVGColor.h"
00029
00030 namespace WebCore {
00031
00032 class SVGPaint : public SVGColor {
00033 public:
00034 enum SVGPaintType {
00035 SVG_PAINTTYPE_UNKNOWN = 0,
00036 SVG_PAINTTYPE_RGBCOLOR = 1,
00037 SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2,
00038 SVG_PAINTTYPE_NONE = 101,
00039 SVG_PAINTTYPE_CURRENTCOLOR = 102,
00040 SVG_PAINTTYPE_URI_NONE = 103,
00041 SVG_PAINTTYPE_URI_CURRENTCOLOR = 104,
00042 SVG_PAINTTYPE_URI_RGBCOLOR = 105,
00043 SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106,
00044 SVG_PAINTTYPE_URI = 107
00045 };
00046
00047 SVGPaint();
00048 SVGPaint(const String& uri);
00049 SVGPaint(SVGPaintType);
00050 SVGPaint(SVGPaintType, const String& uri, const String& rgbPaint = String(), const String& iccPaint = String());
00051 SVGPaint(const Color& c);
00052 SVGPaint(const String& uri, const Color& c);
00053 virtual ~SVGPaint();
00054
00055
00056 SVGPaintType paintType() const { return m_paintType; }
00057 String uri() const;
00058
00059 void setUri(const String&);
00060 void setPaint(SVGPaintType, const String& uri, const String& rgbPaint, const String& iccPaint, ExceptionCode&);
00061
00062 virtual String cssText() const;
00063
00064 static SVGPaint* defaultFill();
00065 static SVGPaint* defaultStroke();
00066
00067 virtual bool isSVGPaint() const { return true; }
00068
00069
00070 virtual unsigned short cssValueType() const { return DOM::CSSValue::CSS_CUSTOM; }
00071 private:
00072 SVGPaintType m_paintType;
00073 String m_uri;
00074 };
00075
00076 }
00077
00078 #endif // ENABLE(SVG)
00079 #endif // SVGPaint_h
00080
00081