• 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
  • bindings
  • js
JSSVGPathSegCustom.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this library; see the file COPYING.LIB. If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 
20 #include "config.h"
21 #include "wtf/Platform.h"
22 
23 #if ENABLE(SVG)
24 #include "JSSVGPathSeg.h"
25 #include "JSSVGPathSegArcAbs.h"
26 #include "JSSVGPathSegArcRel.h"
27 #include "JSSVGPathSegClosePath.h"
28 #include "JSSVGPathSegCurvetoCubicAbs.h"
29 #include "JSSVGPathSegCurvetoCubicRel.h"
30 #include "JSSVGPathSegCurvetoCubicSmoothAbs.h"
31 #include "JSSVGPathSegCurvetoCubicSmoothRel.h"
32 #include "JSSVGPathSegCurvetoQuadraticAbs.h"
33 #include "JSSVGPathSegCurvetoQuadraticRel.h"
34 #include "JSSVGPathSegCurvetoQuadraticSmoothAbs.h"
35 #include "JSSVGPathSegCurvetoQuadraticSmoothRel.h"
36 #include "JSSVGPathSegLinetoAbs.h"
37 #include "JSSVGPathSegLinetoRel.h"
38 #include "JSSVGPathSegLinetoHorizontalAbs.h"
39 #include "JSSVGPathSegLinetoHorizontalRel.h"
40 #include "JSSVGPathSegLinetoVerticalAbs.h"
41 #include "JSSVGPathSegLinetoVerticalRel.h"
42 #include "JSSVGPathSegMovetoAbs.h"
43 #include "JSSVGPathSegMovetoRel.h"
44 
45 #include "kjs_binding.h"
46 
47 #include "SVGPathSeg.h"
48 #include "SVGPathSegArc.h"
49 #include "SVGPathSegClosePath.h"
50 #include "SVGPathSegCurvetoCubic.h"
51 #include "SVGPathSegCurvetoCubicSmooth.h"
52 #include "SVGPathSegCurvetoQuadratic.h"
53 #include "SVGPathSegCurvetoQuadraticSmooth.h"
54 #include "SVGPathSegLineto.h"
55 #include "SVGPathSegLinetoHorizontal.h"
56 #include "SVGPathSegLinetoVertical.h"
57 #include "SVGPathSegMoveto.h"
58 
59 using namespace KJS;
60 
61 namespace khtml {
62 
63 JSValue* toJS(ExecState* exec, SVGPathSeg* obj, SVGElement* context)
64 {
65  if (!obj)
66  return jsNull();
67 
68  switch (obj->pathSegType()) {
69  case SVGPathSeg::PATHSEG_CLOSEPATH:
70  return cacheSVGDOMObject<SVGPathSegClosePath, JSSVGPathSegClosePath, JSSVGPathSegClosePathPrototype>(exec, static_cast<SVGPathSegClosePath*>(obj), context);
71  case SVGPathSeg::PATHSEG_MOVETO_ABS:
72  return cacheSVGDOMObject<SVGPathSegMovetoAbs, JSSVGPathSegMovetoAbs, JSSVGPathSegMovetoAbsPrototype>(exec, static_cast<SVGPathSegMovetoAbs*>(obj), context);
73  case SVGPathSeg::PATHSEG_MOVETO_REL:
74  return cacheSVGDOMObject<SVGPathSegMovetoRel, JSSVGPathSegMovetoRel, JSSVGPathSegMovetoRelPrototype>(exec, static_cast<SVGPathSegMovetoRel*>(obj), context);
75  case SVGPathSeg::PATHSEG_LINETO_ABS:
76  return cacheSVGDOMObject<SVGPathSegLinetoAbs, JSSVGPathSegLinetoAbs, JSSVGPathSegLinetoAbsPrototype>(exec, static_cast<SVGPathSegLinetoAbs*>(obj), context);
77  case SVGPathSeg::PATHSEG_LINETO_REL:
78  return cacheSVGDOMObject<SVGPathSegLinetoRel, JSSVGPathSegLinetoRel, JSSVGPathSegLinetoRelPrototype>(exec, static_cast<SVGPathSegLinetoRel*>(obj), context);
79  case SVGPathSeg::PATHSEG_CURVETO_CUBIC_ABS:
80  return cacheSVGDOMObject<SVGPathSegCurvetoCubicAbs, JSSVGPathSegCurvetoCubicAbs, JSSVGPathSegCurvetoCubicAbsPrototype>(exec, static_cast<SVGPathSegCurvetoCubicAbs*>(obj), context);
81  case SVGPathSeg::PATHSEG_CURVETO_CUBIC_REL:
82  return cacheSVGDOMObject<SVGPathSegCurvetoCubicRel, JSSVGPathSegCurvetoCubicRel, JSSVGPathSegCurvetoCubicRelPrototype>(exec, static_cast<SVGPathSegCurvetoCubicRel*>(obj), context);
83  case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_ABS:
84  return cacheSVGDOMObject<SVGPathSegCurvetoQuadraticAbs, JSSVGPathSegCurvetoQuadraticAbs, JSSVGPathSegCurvetoQuadraticAbsPrototype>(exec, static_cast<SVGPathSegCurvetoQuadraticAbs*>(obj), context);
85  case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_REL:
86  return cacheSVGDOMObject<SVGPathSegCurvetoQuadraticRel, JSSVGPathSegCurvetoQuadraticRel, JSSVGPathSegCurvetoQuadraticRelPrototype>(exec, static_cast<SVGPathSegCurvetoQuadraticRel*>(obj), context);
87  case SVGPathSeg::PATHSEG_ARC_ABS:
88  return cacheSVGDOMObject<SVGPathSegArcAbs, JSSVGPathSegArcAbs, JSSVGPathSegArcAbsPrototype>(exec, static_cast<SVGPathSegArcAbs*>(obj), context);
89  case SVGPathSeg::PATHSEG_ARC_REL:
90  return cacheSVGDOMObject<SVGPathSegArcRel, JSSVGPathSegArcRel, JSSVGPathSegArcRelPrototype>(exec, static_cast<SVGPathSegArcRel*>(obj), context);
91  case SVGPathSeg::PATHSEG_LINETO_HORIZONTAL_ABS:
92  return cacheSVGDOMObject<SVGPathSegLinetoHorizontalAbs, JSSVGPathSegLinetoHorizontalAbs, JSSVGPathSegLinetoHorizontalAbsPrototype>(exec, static_cast<SVGPathSegLinetoHorizontalAbs*>(obj), context);
93  case SVGPathSeg::PATHSEG_LINETO_HORIZONTAL_REL:
94  return cacheSVGDOMObject<SVGPathSegLinetoHorizontalRel, JSSVGPathSegLinetoHorizontalRel, JSSVGPathSegLinetoHorizontalRelPrototype>(exec, static_cast<SVGPathSegLinetoHorizontalRel*>(obj), context);
95  case SVGPathSeg::PATHSEG_LINETO_VERTICAL_ABS:
96  return cacheSVGDOMObject<SVGPathSegLinetoVerticalAbs, JSSVGPathSegLinetoVerticalAbs, JSSVGPathSegLinetoVerticalAbsPrototype>(exec, static_cast<SVGPathSegLinetoVerticalAbs*>(obj), context);
97  case SVGPathSeg::PATHSEG_LINETO_VERTICAL_REL:
98  return cacheSVGDOMObject<SVGPathSegLinetoVerticalRel, JSSVGPathSegLinetoVerticalRel, JSSVGPathSegLinetoVerticalRelPrototype>(exec, static_cast<SVGPathSegLinetoVerticalRel*>(obj), context);
99  case SVGPathSeg::PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:
100  return cacheSVGDOMObject<SVGPathSegCurvetoCubicSmoothAbs, JSSVGPathSegCurvetoCubicSmoothAbs, JSSVGPathSegCurvetoCubicSmoothAbsPrototype>(exec, static_cast<SVGPathSegCurvetoCubicSmoothAbs*>(obj), context);
101  case SVGPathSeg::PATHSEG_CURVETO_CUBIC_SMOOTH_REL:
102  return cacheSVGDOMObject<SVGPathSegCurvetoCubicSmoothRel, JSSVGPathSegCurvetoCubicSmoothRel, JSSVGPathSegCurvetoCubicSmoothRelPrototype>(exec, static_cast<SVGPathSegCurvetoCubicSmoothRel*>(obj), context);
103  case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:
104  return cacheSVGDOMObject<SVGPathSegCurvetoQuadraticSmoothAbs, JSSVGPathSegCurvetoQuadraticSmoothAbs, JSSVGPathSegCurvetoQuadraticSmoothAbsPrototype>(exec, static_cast<SVGPathSegCurvetoQuadraticSmoothAbs*>(obj), context);
105  case SVGPathSeg::PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:
106  return cacheSVGDOMObject<SVGPathSegCurvetoQuadraticSmoothRel, JSSVGPathSegCurvetoQuadraticSmoothRel, JSSVGPathSegCurvetoQuadraticSmoothRelPrototype>(exec, static_cast<SVGPathSegCurvetoQuadraticSmoothRel*>(obj), context);
107  case SVGPathSeg::PATHSEG_UNKNOWN:
108  default:
109  return cacheSVGDOMObject<SVGPathSeg, JSSVGPathSeg, JSSVGPathSegPrototype>(exec, obj, context);
110  }
111 }
112 
113 }
114 
115 #endif // ENABLE(SVG)
116 
117 // vim:ts=4:noet
SVGPathSegClosePath.h
SVGPathSegLinetoVertical.h
SVGPathSegCurvetoQuadratic.h
SVGPathSeg.h
SVGPathSegCurvetoCubicSmooth.h
SVGPathSegLinetoHorizontal.h
SVGPathSegCurvetoCubic.h
SVGPathSegLineto.h
SVGPathSegCurvetoQuadraticSmooth.h
SVGPathSegMoveto.h
SVGPathSegArc.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:21 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