1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/webidl/SVGPathSeg.webidl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,213 @@ 1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + * 1.9 + * The origin of this IDL file is 1.10 + * http://www.w3.org/TR/SVG2/ 1.11 + * 1.12 + * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C 1.13 + * liability, trademark and document use rules apply. 1.14 + */ 1.15 + 1.16 +interface SVGPathSeg { 1.17 + 1.18 + // Path Segment Types 1.19 + const unsigned short PATHSEG_UNKNOWN = 0; 1.20 + const unsigned short PATHSEG_CLOSEPATH = 1; 1.21 + const unsigned short PATHSEG_MOVETO_ABS = 2; 1.22 + const unsigned short PATHSEG_MOVETO_REL = 3; 1.23 + const unsigned short PATHSEG_LINETO_ABS = 4; 1.24 + const unsigned short PATHSEG_LINETO_REL = 5; 1.25 + const unsigned short PATHSEG_CURVETO_CUBIC_ABS = 6; 1.26 + const unsigned short PATHSEG_CURVETO_CUBIC_REL = 7; 1.27 + const unsigned short PATHSEG_CURVETO_QUADRATIC_ABS = 8; 1.28 + const unsigned short PATHSEG_CURVETO_QUADRATIC_REL = 9; 1.29 + const unsigned short PATHSEG_ARC_ABS = 10; 1.30 + const unsigned short PATHSEG_ARC_REL = 11; 1.31 + const unsigned short PATHSEG_LINETO_HORIZONTAL_ABS = 12; 1.32 + const unsigned short PATHSEG_LINETO_HORIZONTAL_REL = 13; 1.33 + const unsigned short PATHSEG_LINETO_VERTICAL_ABS = 14; 1.34 + const unsigned short PATHSEG_LINETO_VERTICAL_REL = 15; 1.35 + const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16; 1.36 + const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17; 1.37 + const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18; 1.38 + const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19; 1.39 + 1.40 + readonly attribute unsigned short pathSegType; 1.41 + readonly attribute DOMString pathSegTypeAsLetter; 1.42 +}; 1.43 + 1.44 +interface SVGPathSegClosePath : SVGPathSeg { 1.45 +}; 1.46 + 1.47 +interface SVGPathSegMovetoAbs : SVGPathSeg { 1.48 + [SetterThrows] 1.49 + attribute float x; 1.50 + [SetterThrows] 1.51 + attribute float y; 1.52 +}; 1.53 + 1.54 +interface SVGPathSegMovetoRel : SVGPathSeg { 1.55 + [SetterThrows] 1.56 + attribute float x; 1.57 + [SetterThrows] 1.58 + attribute float y; 1.59 +}; 1.60 + 1.61 +interface SVGPathSegLinetoAbs : SVGPathSeg { 1.62 + [SetterThrows] 1.63 + attribute float x; 1.64 + [SetterThrows] 1.65 + attribute float y; 1.66 +}; 1.67 + 1.68 +interface SVGPathSegLinetoRel : SVGPathSeg { 1.69 + [SetterThrows] 1.70 + attribute float x; 1.71 + [SetterThrows] 1.72 + attribute float y; 1.73 +}; 1.74 + 1.75 +interface SVGPathSegCurvetoCubicAbs : SVGPathSeg { 1.76 + [SetterThrows] 1.77 + attribute float x; 1.78 + [SetterThrows] 1.79 + attribute float y; 1.80 + [SetterThrows] 1.81 + attribute float x1; 1.82 + [SetterThrows] 1.83 + attribute float y1; 1.84 + [SetterThrows] 1.85 + attribute float x2; 1.86 + [SetterThrows] 1.87 + attribute float y2; 1.88 +}; 1.89 + 1.90 +interface SVGPathSegCurvetoCubicRel : SVGPathSeg { 1.91 + [SetterThrows] 1.92 + attribute float x; 1.93 + [SetterThrows] 1.94 + attribute float y; 1.95 + [SetterThrows] 1.96 + attribute float x1; 1.97 + [SetterThrows] 1.98 + attribute float y1; 1.99 + [SetterThrows] 1.100 + attribute float x2; 1.101 + [SetterThrows] 1.102 + attribute float y2; 1.103 +}; 1.104 + 1.105 +interface SVGPathSegCurvetoQuadraticAbs : SVGPathSeg { 1.106 + [SetterThrows] 1.107 + attribute float x; 1.108 + [SetterThrows] 1.109 + attribute float y; 1.110 + [SetterThrows] 1.111 + attribute float x1; 1.112 + [SetterThrows] 1.113 + attribute float y1; 1.114 +}; 1.115 + 1.116 +interface SVGPathSegCurvetoQuadraticRel : SVGPathSeg { 1.117 + [SetterThrows] 1.118 + attribute float x; 1.119 + [SetterThrows] 1.120 + attribute float y; 1.121 + [SetterThrows] 1.122 + attribute float x1; 1.123 + [SetterThrows] 1.124 + attribute float y1; 1.125 +}; 1.126 + 1.127 +interface SVGPathSegArcAbs : SVGPathSeg { 1.128 + [SetterThrows] 1.129 + attribute float x; 1.130 + [SetterThrows] 1.131 + attribute float y; 1.132 + [SetterThrows] 1.133 + attribute float r1; 1.134 + [SetterThrows] 1.135 + attribute float r2; 1.136 + [SetterThrows] 1.137 + attribute float angle; 1.138 + [SetterThrows] 1.139 + attribute boolean largeArcFlag; 1.140 + [SetterThrows] 1.141 + attribute boolean sweepFlag; 1.142 +}; 1.143 + 1.144 +interface SVGPathSegArcRel : SVGPathSeg { 1.145 + [SetterThrows] 1.146 + attribute float x; 1.147 + [SetterThrows] 1.148 + attribute float y; 1.149 + [SetterThrows] 1.150 + attribute float r1; 1.151 + [SetterThrows] 1.152 + attribute float r2; 1.153 + [SetterThrows] 1.154 + attribute float angle; 1.155 + [SetterThrows] 1.156 + attribute boolean largeArcFlag; 1.157 + [SetterThrows] 1.158 + attribute boolean sweepFlag; 1.159 +}; 1.160 + 1.161 +interface SVGPathSegLinetoHorizontalAbs : SVGPathSeg { 1.162 + [SetterThrows] 1.163 + attribute float x; 1.164 +}; 1.165 + 1.166 +interface SVGPathSegLinetoHorizontalRel : SVGPathSeg { 1.167 + [SetterThrows] 1.168 + attribute float x; 1.169 +}; 1.170 + 1.171 +interface SVGPathSegLinetoVerticalAbs : SVGPathSeg { 1.172 + [SetterThrows] 1.173 + attribute float y; 1.174 +}; 1.175 + 1.176 +interface SVGPathSegLinetoVerticalRel : SVGPathSeg { 1.177 + [SetterThrows] 1.178 + attribute float y; 1.179 +}; 1.180 + 1.181 +interface SVGPathSegCurvetoCubicSmoothAbs : SVGPathSeg { 1.182 + [SetterThrows] 1.183 + attribute float x; 1.184 + [SetterThrows] 1.185 + attribute float y; 1.186 + [SetterThrows] 1.187 + attribute float x2; 1.188 + [SetterThrows] 1.189 + attribute float y2; 1.190 +}; 1.191 + 1.192 +interface SVGPathSegCurvetoCubicSmoothRel : SVGPathSeg { 1.193 + [SetterThrows] 1.194 + attribute float x; 1.195 + [SetterThrows] 1.196 + attribute float y; 1.197 + [SetterThrows] 1.198 + attribute float x2; 1.199 + [SetterThrows] 1.200 + attribute float y2; 1.201 +}; 1.202 + 1.203 +interface SVGPathSegCurvetoQuadraticSmoothAbs : SVGPathSeg { 1.204 + [SetterThrows] 1.205 + attribute float x; 1.206 + [SetterThrows] 1.207 + attribute float y; 1.208 +}; 1.209 + 1.210 +interface SVGPathSegCurvetoQuadraticSmoothRel : SVGPathSeg { 1.211 + [SetterThrows] 1.212 + attribute float x; 1.213 + [SetterThrows] 1.214 + attribute float y; 1.215 +}; 1.216 +