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 27interface SVGPathElement : SVGGraphicsElement { 28 readonly attribute SVGAnimatedNumber pathLength; 29 30 unrestricted float getTotalLength(); 31 SVGPoint getPointAtLength([Default=Undefined] optional unrestricted float distance); 32 unsigned long getPathSegAtLength([Default=Undefined] optional unrestricted float distance); 33 34 SVGPathSegClosePath createSVGPathSegClosePath(); 35 36 SVGPathSegMovetoAbs createSVGPathSegMovetoAbs([Default=Undefined] optional unrestricted float x, 37 [Default=Undefined] optional unrestricted float y); 38 SVGPathSegMovetoRel createSVGPathSegMovetoRel([Default=Undefined] optional unrestricted float x, 39 [Default=Undefined] optional unrestricted float y); 40 41 SVGPathSegLinetoAbs createSVGPathSegLinetoAbs([Default=Undefined] optional unrestricted float x, 42 [Default=Undefined] optional unrestricted float y); 43 SVGPathSegLinetoRel createSVGPathSegLinetoRel([Default=Undefined] optional unrestricted float x, 44 [Default=Undefined] optional unrestricted float y); 45 46 SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs([Default=Undefined] optional unrestricted float x, 47 [Default=Undefined] optional unrestricted float y, 48 [Default=Undefined] optional unrestricted float x1, 49 [Default=Undefined] optional unrestricted float y1, 50 [Default=Undefined] optional unrestricted float x2, 51 [Default=Undefined] optional unrestricted float y2); 52 SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel([Default=Undefined] optional unrestricted float x, 53 [Default=Undefined] optional unrestricted float y, 54 [Default=Undefined] optional unrestricted float x1, 55 [Default=Undefined] optional unrestricted float y1, 56 [Default=Undefined] optional unrestricted float x2, 57 [Default=Undefined] optional unrestricted float y2); 58 59 SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs([Default=Undefined] optional unrestricted float x, 60 [Default=Undefined] optional unrestricted float y, 61 [Default=Undefined] optional unrestricted float x1, 62 [Default=Undefined] optional unrestricted float y1); 63 SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel([Default=Undefined] optional unrestricted float x, 64 [Default=Undefined] optional unrestricted float y, 65 [Default=Undefined] optional unrestricted float x1, 66 [Default=Undefined] optional unrestricted float y1); 67 68 SVGPathSegArcAbs createSVGPathSegArcAbs([Default=Undefined] optional unrestricted float x, 69 [Default=Undefined] optional unrestricted float y, 70 [Default=Undefined] optional unrestricted float r1, 71 [Default=Undefined] optional unrestricted float r2, 72 [Default=Undefined] optional unrestricted float angle, 73 [Default=Undefined] optional boolean largeArcFlag, 74 [Default=Undefined] optional boolean sweepFlag); 75 SVGPathSegArcRel createSVGPathSegArcRel([Default=Undefined] optional unrestricted float x, 76 [Default=Undefined] optional unrestricted float y, 77 [Default=Undefined] optional unrestricted float r1, 78 [Default=Undefined] optional unrestricted float r2, 79 [Default=Undefined] optional unrestricted float angle, 80 [Default=Undefined] optional boolean largeArcFlag, 81 [Default=Undefined] optional boolean sweepFlag); 82 83 SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs([Default=Undefined] optional unrestricted float x); 84 SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel([Default=Undefined] optional unrestricted float x); 85 86 SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs([Default=Undefined] optional unrestricted float y); 87 SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel([Default=Undefined] optional unrestricted float y); 88 89 SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs([Default=Undefined] optional unrestricted float x, 90 [Default=Undefined] optional unrestricted float y, 91 [Default=Undefined] optional unrestricted float x2, 92 [Default=Undefined] optional unrestricted float y2); 93 SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel([Default=Undefined] optional unrestricted float x, 94 [Default=Undefined] optional unrestricted float y, 95 [Default=Undefined] optional unrestricted float x2, 96 [Default=Undefined] optional unrestricted float y2); 97 98 SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs([Default=Undefined] optional unrestricted float x, 99 [Default=Undefined] optional unrestricted float y); 100 SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel([Default=Undefined] optional unrestricted float x, 101 [Default=Undefined] optional unrestricted float y); 102 103 readonly attribute SVGPathSegList pathSegList; 104 readonly attribute SVGPathSegList normalizedPathSegList; 105 readonly attribute SVGPathSegList animatedPathSegList; 106 readonly attribute SVGPathSegList animatedNormalizedPathSegList; 107}; 108 109SVGPathElement implements SVGExternalResourcesRequired; 110