KHTML
SVGFontFaceElement.h
Go to the documentation of this file.
00001 /* 00002 Copyright (C) 2007 Eric Seidel <eric@webkit.org> 00003 Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef SVGFontFaceElement_h 00022 #define SVGFontFaceElement_h 00023 00024 #if ENABLE(SVG_FONTS) 00025 #include "SVGElement.h" 00026 00027 namespace WebCore { 00028 00029 class CSSFontFaceRule; 00030 class CSSMutableStyleDeclaration; 00031 class SVGFontElement; 00032 00033 class SVGFontFaceElement : public SVGElement { 00034 public: 00035 SVGFontFaceElement(const QualifiedName&, Document*); 00036 virtual ~SVGFontFaceElement(); 00037 00038 virtual void parseMappedAttribute(MappedAttribute*); 00039 00040 virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); 00041 virtual void insertedIntoDocument(); 00042 00043 unsigned unitsPerEm() const; 00044 int xHeight() const; 00045 float horizontalOriginX() const; 00046 float horizontalOriginY() const; 00047 float horizontalAdvanceX() const; 00048 float verticalOriginX() const; 00049 float verticalOriginY() const; 00050 float verticalAdvanceY() const; 00051 int ascent() const; 00052 int descent() const; 00053 String fontFamily() const; 00054 00055 SVGFontElement* associatedFontElement() const; 00056 void rebuildFontFace(); 00057 00058 private: 00059 RefPtr<CSSFontFaceRule> m_fontFaceRule; 00060 RefPtr<CSSMutableStyleDeclaration> m_styleDeclaration; 00061 00062 RefPtr<SVGFontElement> m_fontElement; 00063 }; 00064 00065 } // namespace WebCore 00066 00067 #endif // ENABLE(SVG_FONTS) 00068 #endif 00069 00070 // vim:ts=4:noet
KDE 4.6 API Reference