SVGFEFloodElement.cpp [plain text]
#include "config.h"
#if ENABLE(SVG) && ENABLE(SVG_FILTERS)
#include "SVGFEFloodElement.h"
#include "Attr.h"
#include "Document.h"
#include "RenderStyle.h"
#include "SVGNames.h"
#include "SVGRenderStyle.h"
#include "SVGResourceFilter.h"
namespace WebCore {
SVGFEFloodElement::SVGFEFloodElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
, m_filterEffect(0)
{
}
SVGFEFloodElement::~SVGFEFloodElement()
{
}
void SVGFEFloodElement::parseMappedAttribute(MappedAttribute* attr)
{
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
SVGFilterEffect* SVGFEFloodElement::filterEffect(SVGResourceFilter* filter) const
{
ASSERT_NOT_REACHED();
return 0;
}
bool SVGFEFloodElement::build(FilterBuilder* builder)
{
RefPtr<RenderStyle> filterStyle = styleForRenderer();
Color color = filterStyle->svgStyle()->floodColor();
float opacity = filterStyle->svgStyle()->floodOpacity();
builder->add(result(), FEFlood::create(color, opacity));
return true;
}
}
#endif // ENABLE(SVG)