]> git.saurik.com Git - iphone-api.git/blob - WebCore/RenderSVGRoot.h
Add support for new WinterBoard Settings features.
[iphone-api.git] / WebCore / RenderSVGRoot.h
1 /*
2 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 2004, 2005, 2007 Rob Buis <buis@kde.org>
4
5 This file is part of the KDE project
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 aint with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21 */
22
23 #ifndef RenderSVGRoot_h
24 #define RenderSVGRoot_h
25
26 #if ENABLE(SVG)
27 #include "RenderContainer.h"
28 #include "FloatRect.h"
29
30 namespace WebCore {
31
32 class SVGStyledElement;
33 class TransformationMatrix;
34
35 class RenderSVGRoot : public RenderContainer {
36 public:
37 RenderSVGRoot(SVGStyledElement*);
38 ~RenderSVGRoot();
39
40 virtual bool isSVGRoot() const { return true; }
41 virtual const char* renderName() const { return "RenderSVGRoot"; }
42
43 virtual int lineHeight(bool b, bool isRootLineBox = false) const;
44 virtual int baselinePosition(bool b, bool isRootLineBox = false) const;
45 virtual void calcPrefWidths();
46
47 virtual void layout();
48 virtual void paint(PaintInfo&, int parentX, int parentY);
49
50 virtual IntRect clippedOverflowRectForRepaint(RenderBox* repaintContainer);
51 virtual void absoluteRects(Vector<IntRect>& rects, int tx, int ty);
52 virtual void absoluteQuads(Vector<FloatQuad>&, bool topLevel = true);
53 virtual void addFocusRingRects(GraphicsContext*, int tx, int ty);
54
55 virtual TransformationMatrix absoluteTransform() const;
56
57 bool fillContains(const FloatPoint&) const;
58 bool strokeContains(const FloatPoint&) const;
59 FloatRect relativeBBox(bool includeStroke = true) const;
60
61 virtual TransformationMatrix localTransform() const;
62
63 FloatRect viewport() const;
64
65 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
66
67 virtual void position(InlineBox*);
68
69 private:
70 void calcViewport();
71 void applyContentTransforms(PaintInfo&, int parentX, int parentY);
72
73 FloatRect m_viewport;
74 IntRect m_absoluteBounds;
75 };
76
77 } // namespace WebCore
78
79 #endif // ENABLE(SVG)
80 #endif // RenderSVGRoot_h
81
82 // vim:ts=4:noet