/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsIDOMSVGElement.idl"

interface nsIDOMSVGAnimatedNumber;
interface nsIDOMSVGPoint;
interface nsIDOMSVGPathSegClosePath;
interface nsIDOMSVGPathSegMovetoAbs;
interface nsIDOMSVGPathSegMovetoRel;
interface nsIDOMSVGPathSegLinetoAbs;
interface nsIDOMSVGPathSegLinetoRel;
interface nsIDOMSVGPathSegCurvetoCubicAbs;
interface nsIDOMSVGPathSegCurvetoCubicRel;
interface nsIDOMSVGPathSegCurvetoQuadraticAbs;
interface nsIDOMSVGPathSegCurvetoQuadraticRel;
interface nsIDOMSVGPathSegArcAbs;
interface nsIDOMSVGPathSegArcRel;
interface nsIDOMSVGPathSegLinetoHorizontalAbs;
interface nsIDOMSVGPathSegLinetoHorizontalRel;
interface nsIDOMSVGPathSegLinetoVerticalAbs;
interface nsIDOMSVGPathSegLinetoVerticalRel;
interface nsIDOMSVGPathSegCurvetoCubicSmoothAbs;
interface nsIDOMSVGPathSegCurvetoCubicSmoothRel;
interface nsIDOMSVGPathSegCurvetoQuadraticSmoothAbs;
interface nsIDOMSVGPathSegCurvetoQuadraticSmoothRel;

[scriptable, uuid(89AF3EAE-1703-461A-A2E0-86D2131C11AC)]
interface nsIDOMSVGPathElement
  : nsIDOMSVGElement
/*
        The SVG DOM makes use of multiple interface inheritance.
        Since XPCOM only supports single interface inheritance,
        the best thing that we can do is to promise that whenever
        an object implements _this_ interface it will also
        implement the following interfaces. (We then have to QI to
        hop between them.)
        
    nsIDOMSVGTests,
    nsIDOMSVGLangSpace,
    nsIDOMSVGExternalResourcesRequired,
    nsIDOMSVGStylable,
    nsIDOMSVGTransformable,
    events::nsIDOMEventTarget,
    nsIDOMSVGAnimatedPathData
*/
{ 
  readonly attribute nsIDOMSVGAnimatedNumber pathLength;
  
  float          getTotalLength();
  nsIDOMSVGPoint getPointAtLength(in float distance);
  unsigned long  getPathSegAtLength(in float distance);

  nsIDOMSVGPathSegClosePath createSVGPathSegClosePath();
  nsIDOMSVGPathSegMovetoAbs createSVGPathSegMovetoAbs(in float x, in float y);
  nsIDOMSVGPathSegMovetoRel createSVGPathSegMovetoRel(in float x, in float y);
  nsIDOMSVGPathSegLinetoAbs createSVGPathSegLinetoAbs(in float x, in float y);
  nsIDOMSVGPathSegLinetoRel createSVGPathSegLinetoRel(in float x, in float y);

  nsIDOMSVGPathSegCurvetoCubicAbs     createSVGPathSegCurvetoCubicAbs(in float x,
                                                                      in float y,
                                                                      in float x1,
                                                                      in float y1,
                                                                      in float x2,
                                                                      in float y2);
  nsIDOMSVGPathSegCurvetoCubicRel     createSVGPathSegCurvetoCubicRel(in float x,
                                                                      in float y,
                                                                      in float x1,
                                                                      in float y1,
                                                                      in float x2,
                                                                      in float y2);
  nsIDOMSVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(in float x,
                                                                          in float y,
                                                                          in float x1,
                                                                          in float y1);
  nsIDOMSVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(in float x,
                                                                          in float y,
                                                                          in float x1,
                                                                          in float y1);

  nsIDOMSVGPathSegArcAbs createSVGPathSegArcAbs(in float x, in float y, in float r1,
                                                in float r2, in float angle,
                                                in boolean largeArcFlag,
                                                in boolean sweepFlag);
  nsIDOMSVGPathSegArcRel createSVGPathSegArcRel(in float x, in float y, in float r1,
                                                in float r2, in float angle,
                                                in boolean largeArcFlag,
                                                in boolean sweepFlag);

  nsIDOMSVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(in float x);
  nsIDOMSVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(in float x);
  nsIDOMSVGPathSegLinetoVerticalAbs   createSVGPathSegLinetoVerticalAbs(in float y);
  nsIDOMSVGPathSegLinetoVerticalRel   createSVGPathSegLinetoVerticalRel(in float y);

  nsIDOMSVGPathSegCurvetoCubicSmoothAbs     createSVGPathSegCurvetoCubicSmoothAbs(in float x,
                                                                                  in float y,
                                                                                  in float x2,
                                                                                  in float y2);
  nsIDOMSVGPathSegCurvetoCubicSmoothRel     createSVGPathSegCurvetoCubicSmoothRel(in float x,
                                                                                  in float y,
                                                                                  in float x2,
                                                                                  in float y2);
  nsIDOMSVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(in float x,
                                                                                      in float y);
  nsIDOMSVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(in float x,
                                                                                      in float y);
};
