This source file includes following definitions.
- create
- lightSource
#include "config.h"
#include "core/svg/SVGFESpotLightElement.h"
#include "SVGNames.h"
#include "platform/graphics/filters/SpotLightSource.h"
namespace WebCore {
inline SVGFESpotLightElement::SVGFESpotLightElement(Document& document)
: SVGFELightElement(SVGNames::feSpotLightTag, document)
{
ScriptWrappable::init(this);
}
PassRefPtr<SVGFESpotLightElement> SVGFESpotLightElement::create(Document& document)
{
return adoptRef(new SVGFESpotLightElement(document));
}
PassRefPtr<LightSource> SVGFESpotLightElement::lightSource() const
{
FloatPoint3D pos(x()->currentValue()->value(), y()->currentValue()->value(), z()->currentValue()->value());
FloatPoint3D direction(pointsAtX()->currentValue()->value(), pointsAtY()->currentValue()->value(), pointsAtZ()->currentValue()->value());
return SpotLightSource::create(pos, direction, specularExponent()->currentValue()->value(), limitingConeAngle()->currentValue()->value());
}
}