2
Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3
2004, 2005 Rob Buis <buis@kde.org>
5
This file is part of the KDE project
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.
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.
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., 59 Temple Place - Suite 330,
20
Boston, MA 02111-1307, USA.
23
#ifndef RenderSVGContainer_h
24
#define RenderSVGContainer_h
28
#include "RenderContainer.h"
29
#include "RenderPath.h"
48
class RenderSVGContainer : public RenderContainer {
50
RenderSVGContainer(SVGStyledElement*);
51
~RenderSVGContainer();
53
// Some containers do not want it's children
54
// to be drawn, because they may be 'referenced'
55
// Example: <marker> children in SVG
56
void setDrawsContents(bool);
57
bool drawsContents() const;
59
virtual bool isSVGContainer() const { return true; }
60
virtual const char* renderName() const { return "RenderSVGContainer"; }
62
virtual bool requiresLayer();
63
virtual short lineHeight(bool b, bool isRootLineBox = false) const;
64
virtual short baselinePosition(bool b, bool isRootLineBox = false) const;
66
virtual void layout();
67
virtual void paint(PaintInfo&, int parentX, int parentY);
69
virtual IntRect absoluteClippedOverflowRect();
70
virtual void absoluteRects(Vector<IntRect>& rects, int tx, int ty, bool topLevel = true);
72
virtual AffineTransform absoluteTransform() const;
74
bool fillContains(const FloatPoint&) const;
75
bool strokeContains(const FloatPoint&) const;
76
FloatRect relativeBBox(bool includeStroke = true) const;
78
virtual AffineTransform localTransform() const;
79
void setLocalTransform(const AffineTransform&);
81
FloatRect viewport() const;
83
void setViewBox(const FloatRect&);
84
FloatRect viewBox() const;
86
void setAlign(KCAlign);
87
KCAlign align() const;
92
AffineTransform viewportTransform() const;
94
virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
98
AffineTransform getAspectRatio(const FloatRect& logical, const FloatRect& physical) const;
100
bool m_drawsContents : 1;
102
AffineTransform m_matrix;
104
FloatRect m_viewport;
107
IntRect m_absoluteBounds;
110
} // namespace WebCore
112
#endif // ENABLE(SVG)
113
#endif // RenderSVGContainer_h