• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • khtml
  • svg
SVGPathElement.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org>
3  2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
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  along 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 SVGPathElement_h
24 #define SVGPathElement_h
25 
26 #if ENABLE(SVG)
27 #include "SVGAnimatedPathData.h"
28 #include "SVGExternalResourcesRequired.h"
29 #include "SVGLangSpace.h"
30 #include "SVGStyledTransformableElement.h"
31 #include "SVGTests.h"
32 
33 namespace WebCore {
34 
35  class SVGPathSeg;
36  class SVGPathSegArcAbs;
37  class SVGPathSegArcRel;
38  class SVGPathSegClosePath;
39  class SVGPathSegLinetoAbs;
40  class SVGPathSegLinetoRel;
41  class SVGPathSegMovetoAbs;
42  class SVGPathSegMovetoRel;
43  class SVGPathSegCurvetoCubicAbs;
44  class SVGPathSegCurvetoCubicRel;
45  class SVGPathSegLinetoVerticalAbs;
46  class SVGPathSegLinetoVerticalRel;
47  class SVGPathSegLinetoHorizontalAbs;
48  class SVGPathSegLinetoHorizontalRel;
49  class SVGPathSegCurvetoQuadraticAbs;
50  class SVGPathSegCurvetoQuadraticRel;
51  class SVGPathSegCurvetoCubicSmoothAbs;
52  class SVGPathSegCurvetoCubicSmoothRel;
53  class SVGPathSegCurvetoQuadraticSmoothAbs;
54  class SVGPathSegCurvetoQuadraticSmoothRel;
55  class SVGPathElement : public SVGStyledTransformableElement,
56  public SVGTests,
57  public SVGLangSpace,
58  public SVGExternalResourcesRequired,
59  public SVGAnimatedPathData
60  {
61  public:
62  SVGPathElement(const QualifiedName&, Document*);
63  virtual ~SVGPathElement();
64 
65  virtual bool isValid() const { return SVGTests::isValid(); }
66  float getTotalLength();
67  FloatPoint getPointAtLength(float distance);
68  unsigned long getPathSegAtLength(float distance);
69 
70  static PassRefPtr<SVGPathSegClosePath> createSVGPathSegClosePath();
71  static PassRefPtr<SVGPathSegMovetoAbs> createSVGPathSegMovetoAbs(float x, float y);
72  static PassRefPtr<SVGPathSegMovetoRel> createSVGPathSegMovetoRel(float x, float y);
73  static PassRefPtr<SVGPathSegLinetoAbs> createSVGPathSegLinetoAbs(float x, float y);
74  static PassRefPtr<SVGPathSegLinetoRel> createSVGPathSegLinetoRel(float x, float y);
75  static PassRefPtr<SVGPathSegCurvetoCubicAbs> createSVGPathSegCurvetoCubicAbs(float x, float y, float x1, float y1, float x2, float y2);
76  static PassRefPtr<SVGPathSegCurvetoCubicRel> createSVGPathSegCurvetoCubicRel(float x, float y, float x1, float y1, float x2, float y2);
77  static PassRefPtr<SVGPathSegCurvetoQuadraticAbs> createSVGPathSegCurvetoQuadraticAbs(float x, float y, float x1, float y1);
78  static PassRefPtr<SVGPathSegCurvetoQuadraticRel> createSVGPathSegCurvetoQuadraticRel(float x, float y, float x1, float y1);
79  static PassRefPtr<SVGPathSegArcAbs> createSVGPathSegArcAbs(float x, float y, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag);
80  static PassRefPtr<SVGPathSegArcRel> createSVGPathSegArcRel(float x, float y, float r1, float r2, float angle, bool largeArcFlag, bool sweepFlag);
81  static PassRefPtr<SVGPathSegLinetoHorizontalAbs> createSVGPathSegLinetoHorizontalAbs(float x);
82  static PassRefPtr<SVGPathSegLinetoHorizontalRel> createSVGPathSegLinetoHorizontalRel(float x);
83  static PassRefPtr<SVGPathSegLinetoVerticalAbs> createSVGPathSegLinetoVerticalAbs(float y);
84  static PassRefPtr<SVGPathSegLinetoVerticalRel> createSVGPathSegLinetoVerticalRel(float y);
85  static PassRefPtr<SVGPathSegCurvetoCubicSmoothAbs> createSVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2, float y2);
86  static PassRefPtr<SVGPathSegCurvetoCubicSmoothRel> createSVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2, float y2);
87  static PassRefPtr<SVGPathSegCurvetoQuadraticSmoothAbs> createSVGPathSegCurvetoQuadraticSmoothAbs(float x, float y);
88  static PassRefPtr<SVGPathSegCurvetoQuadraticSmoothRel> createSVGPathSegCurvetoQuadraticSmoothRel(float x, float y);
89 
90  // Derived from: 'SVGAnimatedPathData'
91  virtual SVGPathSegList* pathSegList() const;
92  virtual SVGPathSegList* normalizedPathSegList() const;
93  virtual SVGPathSegList* animatedPathSegList() const;
94  virtual SVGPathSegList* animatedNormalizedPathSegList() const;
95 
96  virtual void parseMappedAttribute(MappedAttribute*);
97  virtual void svgAttributeChanged(const QualifiedName&);
98 
99  virtual Path toPathData() const;
100 
101  virtual bool supportsMarkers() const { return true; }
102 
103  // KHTML ElementImpl pure virtual method
104  virtual quint32 id() const;
105  protected:
106  virtual const SVGElement* contextElement() const { return this; }
107 
108  private:
109  mutable RefPtr<SVGPathSegList> m_pathSegList;
110 
111  ANIMATED_PROPERTY_FORWARD_DECLARATIONS(SVGExternalResourcesRequired, bool, ExternalResourcesRequired, externalResourcesRequired)
112 
113  ANIMATED_PROPERTY_DECLARATIONS(SVGPathElement, float, float, PathLength, pathLength)
114  };
115 
116 } // namespace WebCore
117 
118 #endif // ENABLE(SVG)
119 #endif
SVGAnimatedPathData.h
quint32
SVGExternalResourcesRequired.h
WebCore::Path
khtml::Path Path
Definition: PathTraversalState.h:37
SVGTests.h
SVGStyledTransformableElement.h
SVGLangSpace.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal