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 mozilla_dom_SVGFEPointLightElement_h
8 #define mozilla_dom_SVGFEPointLightElement_h
10 #include "SVGAnimatedNumber.h"
11 #include "SVGFilters.h"
13 nsresult
NS_NewSVGFEPointLightElement(
14 nsIContent
** aResult
, already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
);
19 typedef SVGFELightElement SVGFEPointLightElementBase
;
21 class SVGFEPointLightElement
: public SVGFEPointLightElementBase
{
22 friend nsresult(::NS_NewSVGFEPointLightElement(
24 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
));
27 explicit SVGFEPointLightElement(
28 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
)
29 : SVGFEPointLightElementBase(std::move(aNodeInfo
)) {}
30 virtual JSObject
* WrapNode(JSContext
* cx
,
31 JS::Handle
<JSObject
*> aGivenProto
) override
;
34 virtual mozilla::gfx::LightType
ComputeLightAttributes(
35 nsSVGFilterInstance
* aInstance
,
36 nsTArray
<float>& aFloatAttributes
) override
;
37 virtual bool AttributeAffectsRendering(int32_t aNameSpaceID
,
38 nsAtom
* aAttribute
) const override
;
40 virtual nsresult
Clone(dom::NodeInfo
*, nsINode
** aResult
) const override
;
43 already_AddRefed
<DOMSVGAnimatedNumber
> X();
44 already_AddRefed
<DOMSVGAnimatedNumber
> Y();
45 already_AddRefed
<DOMSVGAnimatedNumber
> Z();
48 virtual NumberAttributesInfo
GetNumberInfo() override
;
50 enum { ATTR_X
, ATTR_Y
, ATTR_Z
};
51 SVGAnimatedNumber mNumberAttributes
[3];
52 static NumberInfo sNumberInfo
[3];
56 } // namespace mozilla
58 #endif // mozilla_dom_SVGFEPointLightElement_h