1/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2/* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 4 * You can obtain one at http://mozilla.org/MPL/2.0/. 5 * 6 * The origin of this IDL file is 7 * http://www.w3.org/TR/SVG2/ 8 * 9 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C 10 * liability, trademark and document use rules apply. 11 */ 12 13[NoInterfaceObject] 14interface SVGPathSeg { 15 16 // Path Segment Types 17 const unsigned short PATHSEG_UNKNOWN = 0; 18 const unsigned short PATHSEG_CLOSEPATH = 1; 19 const unsigned short PATHSEG_MOVETO_ABS = 2; 20 const unsigned short PATHSEG_MOVETO_REL = 3; 21 const unsigned short PATHSEG_LINETO_ABS = 4; 22 const unsigned short PATHSEG_LINETO_REL = 5; 23 const unsigned short PATHSEG_CURVETO_CUBIC_ABS = 6; 24 const unsigned short PATHSEG_CURVETO_CUBIC_REL = 7; 25 const unsigned short PATHSEG_CURVETO_QUADRATIC_ABS = 8; 26 const unsigned short PATHSEG_CURVETO_QUADRATIC_REL = 9; 27 const unsigned short PATHSEG_ARC_ABS = 10; 28 const unsigned short PATHSEG_ARC_REL = 11; 29 const unsigned short PATHSEG_LINETO_HORIZONTAL_ABS = 12; 30 const unsigned short PATHSEG_LINETO_HORIZONTAL_REL = 13; 31 const unsigned short PATHSEG_LINETO_VERTICAL_ABS = 14; 32 const unsigned short PATHSEG_LINETO_VERTICAL_REL = 15; 33 const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16; 34 const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17; 35 const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18; 36 const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19; 37 38 [Pure] 39 readonly attribute unsigned short pathSegType; 40 [Pure] 41 readonly attribute DOMString pathSegTypeAsLetter; 42}; 43 44[NoInterfaceObject] 45interface SVGPathSegClosePath : SVGPathSeg { 46}; 47 48[NoInterfaceObject] 49interface SVGPathSegMovetoAbs : SVGPathSeg { 50 [SetterThrows] 51 attribute float x; 52 [SetterThrows] 53 attribute float y; 54}; 55 56[NoInterfaceObject] 57interface SVGPathSegMovetoRel : SVGPathSeg { 58 [SetterThrows] 59 attribute float x; 60 [SetterThrows] 61 attribute float y; 62}; 63 64[NoInterfaceObject] 65interface SVGPathSegLinetoAbs : SVGPathSeg { 66 [SetterThrows] 67 attribute float x; 68 [SetterThrows] 69 attribute float y; 70}; 71 72[NoInterfaceObject] 73interface SVGPathSegLinetoRel : SVGPathSeg { 74 [SetterThrows] 75 attribute float x; 76 [SetterThrows] 77 attribute float y; 78}; 79 80[NoInterfaceObject] 81interface SVGPathSegCurvetoCubicAbs : SVGPathSeg { 82 [SetterThrows] 83 attribute float x; 84 [SetterThrows] 85 attribute float y; 86 [SetterThrows] 87 attribute float x1; 88 [SetterThrows] 89 attribute float y1; 90 [SetterThrows] 91 attribute float x2; 92 [SetterThrows] 93 attribute float y2; 94}; 95 96[NoInterfaceObject] 97interface SVGPathSegCurvetoCubicRel : SVGPathSeg { 98 [SetterThrows] 99 attribute float x; 100 [SetterThrows] 101 attribute float y; 102 [SetterThrows] 103 attribute float x1; 104 [SetterThrows] 105 attribute float y1; 106 [SetterThrows] 107 attribute float x2; 108 [SetterThrows] 109 attribute float y2; 110}; 111 112[NoInterfaceObject] 113interface SVGPathSegCurvetoQuadraticAbs : SVGPathSeg { 114 [SetterThrows] 115 attribute float x; 116 [SetterThrows] 117 attribute float y; 118 [SetterThrows] 119 attribute float x1; 120 [SetterThrows] 121 attribute float y1; 122}; 123 124[NoInterfaceObject] 125interface SVGPathSegCurvetoQuadraticRel : SVGPathSeg { 126 [SetterThrows] 127 attribute float x; 128 [SetterThrows] 129 attribute float y; 130 [SetterThrows] 131 attribute float x1; 132 [SetterThrows] 133 attribute float y1; 134}; 135 136[NoInterfaceObject] 137interface SVGPathSegArcAbs : SVGPathSeg { 138 [SetterThrows] 139 attribute float x; 140 [SetterThrows] 141 attribute float y; 142 [SetterThrows] 143 attribute float r1; 144 [SetterThrows] 145 attribute float r2; 146 [SetterThrows] 147 attribute float angle; 148 [SetterThrows] 149 attribute boolean largeArcFlag; 150 [SetterThrows] 151 attribute boolean sweepFlag; 152}; 153 154[NoInterfaceObject] 155interface SVGPathSegArcRel : SVGPathSeg { 156 [SetterThrows] 157 attribute float x; 158 [SetterThrows] 159 attribute float y; 160 [SetterThrows] 161 attribute float r1; 162 [SetterThrows] 163 attribute float r2; 164 [SetterThrows] 165 attribute float angle; 166 [SetterThrows] 167 attribute boolean largeArcFlag; 168 [SetterThrows] 169 attribute boolean sweepFlag; 170}; 171 172[NoInterfaceObject] 173interface SVGPathSegLinetoHorizontalAbs : SVGPathSeg { 174 [SetterThrows] 175 attribute float x; 176}; 177 178[NoInterfaceObject] 179interface SVGPathSegLinetoHorizontalRel : SVGPathSeg { 180 [SetterThrows] 181 attribute float x; 182}; 183 184[NoInterfaceObject] 185interface SVGPathSegLinetoVerticalAbs : SVGPathSeg { 186 [SetterThrows] 187 attribute float y; 188}; 189 190[NoInterfaceObject] 191interface SVGPathSegLinetoVerticalRel : SVGPathSeg { 192 [SetterThrows] 193 attribute float y; 194}; 195 196[NoInterfaceObject] 197interface SVGPathSegCurvetoCubicSmoothAbs : SVGPathSeg { 198 [SetterThrows] 199 attribute float x; 200 [SetterThrows] 201 attribute float y; 202 [SetterThrows] 203 attribute float x2; 204 [SetterThrows] 205 attribute float y2; 206}; 207 208[NoInterfaceObject] 209interface SVGPathSegCurvetoCubicSmoothRel : SVGPathSeg { 210 [SetterThrows] 211 attribute float x; 212 [SetterThrows] 213 attribute float y; 214 [SetterThrows] 215 attribute float x2; 216 [SetterThrows] 217 attribute float y2; 218}; 219 220[NoInterfaceObject] 221interface SVGPathSegCurvetoQuadraticSmoothAbs : SVGPathSeg { 222 [SetterThrows] 223 attribute float x; 224 [SetterThrows] 225 attribute float y; 226}; 227 228[NoInterfaceObject] 229interface SVGPathSegCurvetoQuadraticSmoothRel : SVGPathSeg { 230 [SetterThrows] 231 attribute float x; 232 [SetterThrows] 233 attribute float y; 234}; 235 236