michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origin of this IDL file is michael@0: * http://www.w3.org/TR/SVG2/ michael@0: * michael@0: * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C michael@0: * liability, trademark and document use rules apply. michael@0: */ michael@0: michael@0: interface SVGPathSeg { michael@0: michael@0: // Path Segment Types michael@0: const unsigned short PATHSEG_UNKNOWN = 0; michael@0: const unsigned short PATHSEG_CLOSEPATH = 1; michael@0: const unsigned short PATHSEG_MOVETO_ABS = 2; michael@0: const unsigned short PATHSEG_MOVETO_REL = 3; michael@0: const unsigned short PATHSEG_LINETO_ABS = 4; michael@0: const unsigned short PATHSEG_LINETO_REL = 5; michael@0: const unsigned short PATHSEG_CURVETO_CUBIC_ABS = 6; michael@0: const unsigned short PATHSEG_CURVETO_CUBIC_REL = 7; michael@0: const unsigned short PATHSEG_CURVETO_QUADRATIC_ABS = 8; michael@0: const unsigned short PATHSEG_CURVETO_QUADRATIC_REL = 9; michael@0: const unsigned short PATHSEG_ARC_ABS = 10; michael@0: const unsigned short PATHSEG_ARC_REL = 11; michael@0: const unsigned short PATHSEG_LINETO_HORIZONTAL_ABS = 12; michael@0: const unsigned short PATHSEG_LINETO_HORIZONTAL_REL = 13; michael@0: const unsigned short PATHSEG_LINETO_VERTICAL_ABS = 14; michael@0: const unsigned short PATHSEG_LINETO_VERTICAL_REL = 15; michael@0: const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16; michael@0: const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17; michael@0: const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18; michael@0: const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19; michael@0: michael@0: readonly attribute unsigned short pathSegType; michael@0: readonly attribute DOMString pathSegTypeAsLetter; michael@0: }; michael@0: michael@0: interface SVGPathSegClosePath : SVGPathSeg { michael@0: }; michael@0: michael@0: interface SVGPathSegMovetoAbs : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: [SetterThrows] michael@0: attribute float y; michael@0: }; michael@0: michael@0: interface SVGPathSegMovetoRel : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: [SetterThrows] michael@0: attribute float y; michael@0: }; michael@0: michael@0: interface SVGPathSegLinetoAbs : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: [SetterThrows] michael@0: attribute float y; michael@0: }; michael@0: michael@0: interface SVGPathSegLinetoRel : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: [SetterThrows] michael@0: attribute float y; michael@0: }; michael@0: michael@0: interface SVGPathSegCurvetoCubicAbs : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: [SetterThrows] michael@0: attribute float y; michael@0: [SetterThrows] michael@0: attribute float x1; michael@0: [SetterThrows] michael@0: attribute float y1; michael@0: [SetterThrows] michael@0: attribute float x2; michael@0: [SetterThrows] michael@0: attribute float y2; michael@0: }; michael@0: michael@0: interface SVGPathSegCurvetoCubicRel : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: [SetterThrows] michael@0: attribute float y; michael@0: [SetterThrows] michael@0: attribute float x1; michael@0: [SetterThrows] michael@0: attribute float y1; michael@0: [SetterThrows] michael@0: attribute float x2; michael@0: [SetterThrows] michael@0: attribute float y2; michael@0: }; michael@0: michael@0: interface SVGPathSegCurvetoQuadraticAbs : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: [SetterThrows] michael@0: attribute float y; michael@0: [SetterThrows] michael@0: attribute float x1; michael@0: [SetterThrows] michael@0: attribute float y1; michael@0: }; michael@0: michael@0: interface SVGPathSegCurvetoQuadraticRel : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: [SetterThrows] michael@0: attribute float y; michael@0: [SetterThrows] michael@0: attribute float x1; michael@0: [SetterThrows] michael@0: attribute float y1; michael@0: }; michael@0: michael@0: interface SVGPathSegArcAbs : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: [SetterThrows] michael@0: attribute float y; michael@0: [SetterThrows] michael@0: attribute float r1; michael@0: [SetterThrows] michael@0: attribute float r2; michael@0: [SetterThrows] michael@0: attribute float angle; michael@0: [SetterThrows] michael@0: attribute boolean largeArcFlag; michael@0: [SetterThrows] michael@0: attribute boolean sweepFlag; michael@0: }; michael@0: michael@0: interface SVGPathSegArcRel : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: [SetterThrows] michael@0: attribute float y; michael@0: [SetterThrows] michael@0: attribute float r1; michael@0: [SetterThrows] michael@0: attribute float r2; michael@0: [SetterThrows] michael@0: attribute float angle; michael@0: [SetterThrows] michael@0: attribute boolean largeArcFlag; michael@0: [SetterThrows] michael@0: attribute boolean sweepFlag; michael@0: }; michael@0: michael@0: interface SVGPathSegLinetoHorizontalAbs : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: }; michael@0: michael@0: interface SVGPathSegLinetoHorizontalRel : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: }; michael@0: michael@0: interface SVGPathSegLinetoVerticalAbs : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float y; michael@0: }; michael@0: michael@0: interface SVGPathSegLinetoVerticalRel : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float y; michael@0: }; michael@0: michael@0: interface SVGPathSegCurvetoCubicSmoothAbs : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: [SetterThrows] michael@0: attribute float y; michael@0: [SetterThrows] michael@0: attribute float x2; michael@0: [SetterThrows] michael@0: attribute float y2; michael@0: }; michael@0: michael@0: interface SVGPathSegCurvetoCubicSmoothRel : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: [SetterThrows] michael@0: attribute float y; michael@0: [SetterThrows] michael@0: attribute float x2; michael@0: [SetterThrows] michael@0: attribute float y2; michael@0: }; michael@0: michael@0: interface SVGPathSegCurvetoQuadraticSmoothAbs : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: [SetterThrows] michael@0: attribute float y; michael@0: }; michael@0: michael@0: interface SVGPathSegCurvetoQuadraticSmoothRel : SVGPathSeg { michael@0: [SetterThrows] michael@0: attribute float x; michael@0: [SetterThrows] michael@0: attribute float y; michael@0: }; michael@0: