SVGFETileElement.cpp [plain text]
#include "config.h"
#if ENABLE(SVG) && ENABLE(SVG_FILTERS)
#include "SVGFETileElement.h"
#include "Attr.h"
#include "SVGRenderStyle.h"
#include "SVGResourceFilter.h"
namespace WebCore {
SVGFETileElement::SVGFETileElement(const QualifiedName& tagName, Document* doc)
: SVGFilterPrimitiveStandardAttributes(tagName, doc)
, m_in1(this, SVGNames::inAttr)
, m_filterEffect(0)
{
}
SVGFETileElement::~SVGFETileElement()
{
}
void SVGFETileElement::parseMappedAttribute(MappedAttribute* attr)
{
const String& value = attr->value();
if (attr->name() == SVGNames::inAttr)
setIn1BaseValue(value);
else
SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
}
SVGFilterEffect* SVGFETileElement::filterEffect(SVGResourceFilter* filter) const
{
ASSERT_NOT_REACHED();
return 0;
}
bool SVGFETileElement::build(FilterBuilder* builder)
{
FilterEffect* input1 = builder->getEffectById(in1());
if(!input1)
return false;
builder->add(result(), FETile::create(input1));
return true;
}
}
#endif // ENABLE(SVG)