SVGFELightElement.h [plain text]
#pragma once
#include "LightSource.h"
#include "SVGElement.h"
namespace WebCore {
class SVGFilterBuilder;
class SVGFELightElement : public SVGElement {
WTF_MAKE_ISO_ALLOCATED(SVGFELightElement);
public:
virtual Ref<LightSource> lightSource(SVGFilterBuilder&) const = 0;
static SVGFELightElement* findLightElement(const SVGElement*);
float azimuth() const { return m_azimuth->currentValue(); }
float elevation() const { return m_elevation->currentValue(); }
float x() const { return m_x->currentValue(); }
float y() const { return m_y->currentValue(); }
float z() const { return m_z->currentValue(); }
float pointsAtX() const { return m_pointsAtX->currentValue(); }
float pointsAtY() const { return m_pointsAtY->currentValue(); }
float pointsAtZ() const { return m_pointsAtZ->currentValue(); }
float specularExponent() const { return m_specularExponent->currentValue(); }
float limitingConeAngle() const { return m_limitingConeAngle->currentValue(); }
SVGAnimatedNumber& azimuthAnimated() { return m_azimuth; }
SVGAnimatedNumber& elevationAnimated() { return m_elevation; }
SVGAnimatedNumber& xAnimated() { return m_x; }
SVGAnimatedNumber& yAnimated() { return m_y; }
SVGAnimatedNumber& zAnimated() { return m_z; }
SVGAnimatedNumber& pointsAtXAnimated() { return m_pointsAtX; }
SVGAnimatedNumber& pointsAtYAnimated() { return m_pointsAtY; }
SVGAnimatedNumber& pointsAtZAnimated() { return m_pointsAtZ; }
SVGAnimatedNumber& specularExponentAnimated() { return m_specularExponent; }
SVGAnimatedNumber& limitingConeAngleAnimated() { return m_limitingConeAngle; }
protected:
SVGFELightElement(const QualifiedName&, Document&);
bool rendererIsNeeded(const RenderStyle&) override { return false; }
private:
using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFELightElement, SVGElement>;
const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
void parseAttribute(const QualifiedName&, const AtomString&) override;
void svgAttributeChanged(const QualifiedName&) override;
void childrenChanged(const ChildChange&) override;
PropertyRegistry m_propertyRegistry { *this };
Ref<SVGAnimatedNumber> m_azimuth { SVGAnimatedNumber::create(this) };
Ref<SVGAnimatedNumber> m_elevation { SVGAnimatedNumber::create(this) };
Ref<SVGAnimatedNumber> m_x { SVGAnimatedNumber::create(this) };
Ref<SVGAnimatedNumber> m_y { SVGAnimatedNumber::create(this) };
Ref<SVGAnimatedNumber> m_z { SVGAnimatedNumber::create(this) };
Ref<SVGAnimatedNumber> m_pointsAtX { SVGAnimatedNumber::create(this) };
Ref<SVGAnimatedNumber> m_pointsAtY { SVGAnimatedNumber::create(this) };
Ref<SVGAnimatedNumber> m_pointsAtZ { SVGAnimatedNumber::create(this) };
Ref<SVGAnimatedNumber> m_specularExponent { SVGAnimatedNumber::create(this, 1) };
Ref<SVGAnimatedNumber> m_limitingConeAngle { SVGAnimatedNumber::create(this) };
};
}