KHtml

RenderSVGRoot.h
1 /*
2  Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <[email protected]>
3  2004, 2005, 2007 Rob Buis <[email protected]>
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 "RenderBox.h"
29 #include "FloatRect.h"
30 
31 namespace WebCore
32 {
33 
34 class SVGStyledElement;
35 class AffineTransform;
36 
37 class RenderSVGRoot : public RenderBox /*RenderContainer in WebCore*/
38 {
39 public:
40  RenderSVGRoot(SVGStyledElement *);
41  ~RenderSVGRoot();
42 
43  bool isSVGRoot() const override
44  {
45  return true;
46  }
47  const char *renderName() const override
48  {
49  return "RenderSVGRoot";
50  }
51 
52  short lineHeight(bool b) const override;
53  short baselinePosition(bool b) const override;
54  void calcMinMaxWidth() override;
55 
56  void layout() override;
57  void paint(PaintInfo &, int parentX, int parentY) override;
58 
59  virtual IntRect absoluteClippedOverflowRect();
60  virtual void absoluteRects(Vector<IntRect> &rects, int tx, int ty);
61  //virtual void addFocusRingRects(GraphicsContext*, int tx, int ty);
62 
63  AffineTransform absoluteTransform() const override;
64 
65  bool fillContains(const FloatPoint &) const;
66  bool strokeContains(const FloatPoint &) const;
67  FloatRect relativeBBox(bool includeStroke = true) const override;
68 
69  AffineTransform localTransform() const override;
70 
71  FloatRect viewport() const;
72 
73  //virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);
74 
75 private:
76  void calcViewport();
77 
78  //void applyContentTransforms(PaintInfo&, int parentX, int parentY);
79 
80  FloatRect m_viewport;
81  IntRect m_absoluteBounds;
82 };
83 
84 } // namespace WebCore
85 
86 #endif // ENABLE(SVG)
87 #endif // RenderSVGRoot_h
88 
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Oct 26 2021 22:48:09 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.