SVGFESpecularLightingElement.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* -*- Mode: C++; tab-width: 8; 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/. */
  5. #ifndef mozilla_dom_SVGFESpecularLightingElement_h
  6. #define mozilla_dom_SVGFESpecularLightingElement_h
  7. #include "nsSVGFilters.h"
  8. nsresult NS_NewSVGFESpecularLightingElement(nsIContent **aResult,
  9. already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
  10. namespace mozilla {
  11. namespace dom {
  12. //---------------------SpecularLighting------------------------
  13. typedef nsSVGFELightingElement SVGFESpecularLightingElementBase;
  14. class SVGFESpecularLightingElement : public SVGFESpecularLightingElementBase
  15. {
  16. friend nsresult (::NS_NewSVGFESpecularLightingElement(nsIContent **aResult,
  17. already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
  18. protected:
  19. explicit SVGFESpecularLightingElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo)
  20. : SVGFESpecularLightingElementBase(aNodeInfo)
  21. {
  22. }
  23. virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
  24. public:
  25. virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
  26. virtual FilterPrimitiveDescription
  27. GetPrimitiveDescription(nsSVGFilterInstance* aInstance,
  28. const IntRect& aFilterSubregion,
  29. const nsTArray<bool>& aInputsAreTainted,
  30. nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
  31. virtual bool AttributeAffectsRendering(
  32. int32_t aNameSpaceID, nsIAtom* aAttribute) const override;
  33. // WebIDL
  34. already_AddRefed<SVGAnimatedString> In1();
  35. already_AddRefed<SVGAnimatedNumber> SurfaceScale();
  36. already_AddRefed<SVGAnimatedNumber> SpecularConstant();
  37. already_AddRefed<SVGAnimatedNumber> SpecularExponent();
  38. already_AddRefed<SVGAnimatedNumber> KernelUnitLengthX();
  39. already_AddRefed<SVGAnimatedNumber> KernelUnitLengthY();
  40. };
  41. } // namespace dom
  42. } // namespace mozilla
  43. #endif // mozilla_dom_SVGFESpecularLightingElement_h