KHTML
SVGFETileElement.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include "config.h"
00024
00025 #if ENABLE(SVG) && ENABLE(SVG_FILTERS)
00026 #include "SVGFETileElement.h"
00027
00028 #include "Attr.h"
00029 #include "SVGRenderStyle.h"
00030 #include "SVGResourceFilter.h"
00031
00032 namespace WebCore {
00033
00034 SVGFETileElement::SVGFETileElement(const QualifiedName& tagName, Document* doc)
00035 : SVGFilterPrimitiveStandardAttributes(tagName, doc)
00036 , m_filterEffect(0)
00037 {
00038 }
00039
00040 SVGFETileElement::~SVGFETileElement()
00041 {
00042 delete m_filterEffect;
00043 }
00044
00045 ANIMATED_PROPERTY_DEFINITIONS(SVGFETileElement, String, String, string, In1, in1, SVGNames::inAttr, m_in1)
00046
00047 void SVGFETileElement::parseMappedAttribute(MappedAttribute* attr)
00048 {
00049 const String& value = attr->value();
00050 if (attr->name() == SVGNames::inAttr)
00051 setIn1BaseValue(value);
00052 else
00053 SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
00054 }
00055
00056 SVGFETile* SVGFETileElement::filterEffect(SVGResourceFilter* filter) const
00057 {
00058 if (!m_filterEffect)
00059 m_filterEffect = new SVGFETile(filter);
00060
00061 m_filterEffect->setIn(in1());
00062
00063 setStandardAttributes(m_filterEffect);
00064 return m_filterEffect;
00065 }
00066
00067 }
00068
00069 #endif // ENABLE(SVG)
00070
00071