1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef DOM_SVG_SVGPATHSEGLISTSMILTYPE_H_
8 #define DOM_SVG_SVGPATHSEGLISTSMILTYPE_H_
10 #include "mozilla/Attributes.h"
11 #include "mozilla/SMILType.h"
17 ////////////////////////////////////////////////////////////////////////
18 // SVGPathSegListSMILType
20 // Operations for animating an SVGPathData.
22 class SVGPathSegListSMILType
: public SMILType
{
24 // Singleton for SMILValue objects to hold onto.
25 static SVGPathSegListSMILType
* Singleton() {
26 static SVGPathSegListSMILType sSingleton
;
32 // -------------------
34 virtual void Init(SMILValue
& aValue
) const override
;
36 virtual void Destroy(SMILValue
& aValue
) const override
;
37 virtual nsresult
Assign(SMILValue
& aDest
,
38 const SMILValue
& aSrc
) const override
;
39 virtual bool IsEqual(const SMILValue
& aLeft
,
40 const SMILValue
& aRight
) const override
;
41 virtual nsresult
Add(SMILValue
& aDest
, const SMILValue
& aValueToAdd
,
42 uint32_t aCount
) const override
;
43 virtual nsresult
ComputeDistance(const SMILValue
& aFrom
, const SMILValue
& aTo
,
44 double& aDistance
) const override
;
45 virtual nsresult
Interpolate(const SMILValue
& aStartVal
,
46 const SMILValue
& aEndVal
, double aUnitDistance
,
47 SMILValue
& aResult
) const override
;
50 // Private constructor: prevent instances beyond my singleton.
51 constexpr SVGPathSegListSMILType() = default;
54 } // namespace mozilla
56 #endif // DOM_SVG_SVGPATHSEGLISTSMILTYPE_H_