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_SVGFEDISTANTLIGHTELEMENT_H_
8 #define DOM_SVG_SVGFEDISTANTLIGHTELEMENT_H_
10 #include "SVGAnimatedNumber.h"
11 #include "mozilla/dom/SVGFilters.h"
13 nsresult
NS_NewSVGFEDistantLightElement(
14 nsIContent
** aResult
, already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
);
16 namespace mozilla::dom
{
18 using SVGFEDistantLightElementBase
= SVGFELightElement
;
20 class SVGFEDistantLightElement final
: public SVGFEDistantLightElementBase
{
21 friend nsresult(::NS_NewSVGFEDistantLightElement(
23 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
));
26 explicit SVGFEDistantLightElement(
27 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
)
28 : SVGFEDistantLightElementBase(std::move(aNodeInfo
)) {}
29 JSObject
* WrapNode(JSContext
* aCx
,
30 JS::Handle
<JSObject
*> aGivenProto
) override
;
33 mozilla::gfx::LightType
ComputeLightAttributes(
34 SVGFilterInstance
* aInstance
, nsTArray
<float>& aFloatAttributes
) override
;
35 bool AttributeAffectsRendering(int32_t aNameSpaceID
,
36 nsAtom
* aAttribute
) const override
;
38 nsresult
Clone(dom::NodeInfo
*, nsINode
** aResult
) const override
;
41 already_AddRefed
<DOMSVGAnimatedNumber
> Azimuth();
42 already_AddRefed
<DOMSVGAnimatedNumber
> Elevation();
45 NumberAttributesInfo
GetNumberInfo() override
;
47 enum { AZIMUTH
, ELEVATION
};
48 SVGAnimatedNumber mNumberAttributes
[2];
49 static NumberInfo sNumberInfo
[2];
52 } // namespace mozilla::dom
54 #endif // DOM_SVG_SVGFEDISTANTLIGHTELEMENT_H_