|
1 /* |
|
2 Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
|
3 2004, 2005 Rob Buis <buis@kde.org> |
|
4 2006 Alexander Kellett <lypanov@kde.org> |
|
5 |
|
6 This file is part of the KDE project |
|
7 |
|
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. |
|
12 |
|
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. |
|
17 |
|
18 You should have received a copy of the GNU Library General Public License |
|
19 aint 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. |
|
22 */ |
|
23 |
|
24 #ifndef KCanvasRenderingStyle_h |
|
25 #define KCanvasRenderingStyle_h |
|
26 |
|
27 #if ENABLE(SVG) |
|
28 |
|
29 #include <wtf/Vector.h> |
|
30 |
|
31 #if PLATFORM(CG) |
|
32 #include "CgSupport.h" |
|
33 #endif |
|
34 |
|
35 namespace WebCore { |
|
36 |
|
37 // Special types |
|
38 #if PLATFORM(CG) |
|
39 typedef Vector<CGFloat> KCDashArray; |
|
40 #else |
|
41 typedef Vector<float> KCDashArray; |
|
42 #endif |
|
43 |
|
44 class CSSValue; |
|
45 class SVGPaintServer; |
|
46 class RenderStyle; |
|
47 class RenderObject; |
|
48 |
|
49 class KSVGPainterFactory { |
|
50 public: |
|
51 static SVGPaintServer* strokePaintServer(const RenderStyle*, const RenderObject*); |
|
52 static SVGPaintServer* fillPaintServer(const RenderStyle*, const RenderObject*); |
|
53 |
|
54 // Helpers |
|
55 static double cssPrimitiveToLength(const RenderObject*, CSSValue*, double defaultValue = 0.0); |
|
56 static KCDashArray dashArrayFromRenderingStyle(const RenderStyle*); |
|
57 }; |
|
58 |
|
59 } // namespace WebCore |
|
60 |
|
61 #endif // ENABLE(SVG) |
|
62 #endif // KCanvasRenderingStyle_h |
|
63 |
|
64 // vim:ts=4:noet |