• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
3 * Copyright (C) 2006 Apple Inc. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 *    notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 *    notice, this list of conditions and the following disclaimer in the
12 *    documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27module svg {
28
29    interface [Conditional=SVG] SVGPathElement : SVGElement,
30                                                 SVGTests,
31                                                 SVGLangSpace,
32                                                 SVGExternalResourcesRequired,
33                                                 SVGStylable,
34                                                 SVGTransformable {
35        readonly attribute SVGAnimatedNumber pathLength;
36
37        float getTotalLength();
38        SVGPoint getPointAtLength(in float distance);
39        unsigned long getPathSegAtLength(in float distance);
40
41        SVGPathSegClosePath createSVGPathSegClosePath();
42
43        SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(in float x,
44                                                      in float y);
45        SVGPathSegMovetoRel createSVGPathSegMovetoRel(in float x,
46                                                      in float y);
47
48        SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(in float x,
49                                                      in float y);
50        SVGPathSegLinetoRel createSVGPathSegLinetoRel(in float x,
51                                                      in float y);
52
53        SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs(in float x,
54                                                                  in float y,
55                                                                  in float x1,
56                                                                  in float y1,
57                                                                  in float x2,
58                                                                  in float y2);
59        SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel(in float x,
60                                                                  in float y,
61                                                                  in float x1,
62                                                                  in float y1,
63                                                                  in float x2,
64                                                                  in float y2);
65
66        SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(in float x,
67                                                                          in float y,
68                                                                          in float x1,
69                                                                          in float y1);
70        SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(in float x,
71                                                                          in float y,
72                                                                          in float x1,
73                                                                          in float y1);
74
75        SVGPathSegArcAbs createSVGPathSegArcAbs(in float x,
76                                                in float y,
77                                                in float r1,
78                                                in float r2,
79                                                in float angle,
80                                                in boolean largeArcFlag,
81                                                in boolean sweepFlag);
82        SVGPathSegArcRel createSVGPathSegArcRel(in float x,
83                                                in float y,
84                                                in float r1,
85                                                in float r2,
86                                                in float angle,
87                                                in boolean largeArcFlag,
88                                                in boolean sweepFlag);
89
90        SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(in float x);
91        SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(in float x);
92
93        SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs(in float y);
94        SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel(in float y);
95
96        SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(in float x,
97                                                                              in float y,
98                                                                              in float x2,
99                                                                              in float y2);
100        SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(in float x,
101                                                                              in float y,
102                                                                              in float x2,
103                                                                              in float y2);
104
105        SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(in float x,
106                                                                                      in float y);
107        SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(in float x,
108                                                                                      in float y);
109
110        readonly attribute SVGPathSegList pathSegList;
111        readonly attribute SVGPathSegList normalizedPathSegList;
112        readonly attribute SVGPathSegList animatedPathSegList;
113        readonly attribute SVGPathSegList animatedNormalizedPathSegList;
114    };
115
116}
117