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_SVGPOINTLISTSMILTYPE_H_
8 #define DOM_SVG_SVGPOINTLISTSMILTYPE_H_
10 #include "mozilla/Attributes.h"
11 #include "mozilla/SMILType.h"
17 ////////////////////////////////////////////////////////////////////////
18 // SVGPointListSMILType
20 // Operations for animating an SVGPointList.
22 class SVGPointListSMILType
: public SMILType
{
24 // Singleton for SMILValue objects to hold onto.
25 static SVGPointListSMILType sSingleton
;
29 // -------------------
31 void Init(SMILValue
& aValue
) const override
;
33 void Destroy(SMILValue
& aValue
) const override
;
34 nsresult
Assign(SMILValue
& aDest
, const SMILValue
& aSrc
) const override
;
35 bool IsEqual(const SMILValue
& aLeft
, const SMILValue
& aRight
) const override
;
36 nsresult
Add(SMILValue
& aDest
, const SMILValue
& aValueToAdd
,
37 uint32_t aCount
) const override
;
38 nsresult
ComputeDistance(const SMILValue
& aFrom
, const SMILValue
& aTo
,
39 double& aDistance
) const override
;
40 nsresult
Interpolate(const SMILValue
& aStartVal
, const SMILValue
& aEndVal
,
41 double aUnitDistance
, SMILValue
& aResult
) const override
;
44 // Private constructor: prevent instances beyond my singleton.
45 constexpr SVGPointListSMILType() = default;
48 } // namespace mozilla
50 #endif // DOM_SVG_SVGPOINTLISTSMILTYPE_H_