fix logic
[personal-kdelibs.git] / khtml / svg / SVGHKernElement.h
blob641ab8b4c08426ef47667d281189c3df7f94c762
1 /*
2 Copyright (C) 2007 Eric Seidel <eric@webkit.org>
3 Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
4 Copyright (C) 2008 Apple, Inc
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
22 #ifndef SVGHKernElement_h
23 #define SVGHKernElement_h
25 #if ENABLE(SVG_FONTS)
26 #include "SVGStyledElement.h"
28 #include <limits>
29 #include "Path.h"
31 namespace khtml
33 class AtomicString;
36 namespace WebCore {
38 //class AtomicString;
39 using khtml::AtomicString;
40 struct SVGFontData;
42 // Describe an SVG <hkern> element
43 struct SVGHorizontalKerningPair {
44 String unicode1;
45 String glyphName1;
46 String unicode2;
47 String glyphName2;
48 double kerning;
50 SVGHorizontalKerningPair()
51 : kerning(0)
56 class SVGHKernElement : public SVGElement {
57 public:
58 SVGHKernElement(const QualifiedName&, Document*);
59 virtual ~SVGHKernElement();
61 virtual void insertedIntoDocument();
62 virtual void removedFromDocument();
64 virtual bool rendererIsNeeded(RenderStyle*) { return false; }
66 SVGHorizontalKerningPair buildHorizontalKerningPair() const;
68 // KHTML ElementImpl pure virtual method
69 virtual quint32 id() const { return SVGNames::textTag.id(); }
70 virtual DOMString tagName() const { return SVGNames::textTag.tagName(); }
73 } // namespace WebCore
75 #endif // ENABLE(SVG_FONTS)
76 #endif