1 /* a*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef mozilla_dom_SVGFEDistantLightElement_h
7 #define mozilla_dom_SVGFEDistantLightElement_h
9 #include "nsSVGFilters.h"
10 #include "nsSVGNumber2.h"
12 nsresult
NS_NewSVGFEDistantLightElement(nsIContent
**aResult
,
13 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
);
18 typedef SVGFELightElement SVGFEDistantLightElementBase
;
20 class SVGFEDistantLightElement
: public SVGFEDistantLightElementBase
22 friend nsresult (::NS_NewSVGFEDistantLightElement(nsIContent
**aResult
,
23 already_AddRefed
<mozilla::dom::NodeInfo
>&& aNodeInfo
));
25 explicit SVGFEDistantLightElement(already_AddRefed
<mozilla::dom::NodeInfo
>& aNodeInfo
)
26 : SVGFEDistantLightElementBase(aNodeInfo
)
29 virtual JSObject
* WrapNode(JSContext
* aCx
) MOZ_OVERRIDE
;
32 virtual AttributeMap
ComputeLightAttributes(nsSVGFilterInstance
* aInstance
) MOZ_OVERRIDE
;
33 virtual bool AttributeAffectsRendering(
34 int32_t aNameSpaceID
, nsIAtom
* aAttribute
) const MOZ_OVERRIDE
;
36 virtual nsresult
Clone(mozilla::dom::NodeInfo
*aNodeInfo
, nsINode
**aResult
) const MOZ_OVERRIDE
;
39 already_AddRefed
<SVGAnimatedNumber
> Azimuth();
40 already_AddRefed
<SVGAnimatedNumber
> Elevation();
43 virtual NumberAttributesInfo
GetNumberInfo() MOZ_OVERRIDE
;
45 enum { AZIMUTH
, ELEVATION
};
46 nsSVGNumber2 mNumberAttributes
[2];
47 static NumberInfo sNumberInfo
[2];
51 } // namespace mozilla
53 #endif // mozilla_dom_SVGFEDistantLightElement_h