File indexing completed on 2024-04-28 11:39:00
0001 /* 0002 * This file is part of the WebKit project. 0003 * 0004 * Copyright (C) 2006 Apple Computer, Inc. 0005 * (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 0006 * 0007 * This library is free software; you can redistribute it and/or 0008 * modify it under the terms of the GNU Library General Public 0009 * License as published by the Free Software Foundation; either 0010 * version 2 of the License, or (at your option) any later version. 0011 * 0012 * This library is distributed in the hope that it will be useful, 0013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0015 * Library General Public License for more details. 0016 * 0017 * You should have received a copy of the GNU Library General Public License 0018 * along with this library; see the file COPYING.LIB. If not, write to 0019 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 0020 * Boston, MA 02110-1301, USA. 0021 * 0022 */ 0023 0024 #ifndef RenderSVGText_h 0025 #define RenderSVGText_h 0026 0027 #if ENABLE(SVG) 0028 0029 #include "AffineTransform.h" 0030 #include "RenderSVGBlock.h" 0031 #include "IntRect.h" 0032 0033 namespace WebCore 0034 { 0035 0036 class SVGTextElement; 0037 0038 class RenderSVGText : public RenderSVGBlock 0039 { 0040 public: 0041 RenderSVGText(SVGTextElement *node); 0042 0043 const char *renderName() const override 0044 { 0045 return "RenderSVGText"; 0046 } 0047 0048 bool isSVGText() const override 0049 { 0050 return true; 0051 } 0052 0053 bool calculateLocalTransform(); 0054 AffineTransform localTransform() const override 0055 { 0056 return m_localTransform; 0057 } 0058 0059 void paint(PaintInfo &, int tx, int ty) override; 0060 /*virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);*/ 0061 0062 bool requiresLayer() const override; 0063 void layout() override; 0064 0065 virtual void absoluteRects(Vector<IntRect> &, int tx, int ty, bool topLevel = true); 0066 virtual IntRect absoluteClippedOverflowRect(); 0067 FloatRect relativeBBox(bool includeStroke = true) const override; 0068 0069 InlineBox *createInlineBox(bool makePlaceHolderBox, bool isRootLineBox/*, bool isOnlyRun = false*/) override; 0070 0071 private: 0072 AffineTransform m_localTransform; 0073 IntRect m_absoluteBounds; 0074 }; 0075 0076 } 0077 0078 #endif // ENABLE(SVG) 0079 #endif 0080