SVGFEBlendElement.h [plain text]
#ifndef SVGFEBlendElement_h
#define SVGFEBlendElement_h
#include "FEBlend.h"
#include "SVGAnimatedEnumeration.h"
#include "SVGFilterPrimitiveStandardAttributes.h"
namespace WebCore {
template<>
struct SVGPropertyTraits<BlendMode> {
static unsigned highestEnumValue() { return BlendModeLighten; }
static String toString(BlendMode type)
{
switch (type) {
case BlendModeNormal:
return "normal";
case BlendModeMultiply:
return "multiply";
case BlendModeScreen:
return "screen";
case BlendModeDarken:
return "darken";
case BlendModeLighten:
return "lighten";
default:
return emptyString();
}
}
};
class SVGFEBlendElement final : public SVGFilterPrimitiveStandardAttributes {
public:
static Ref<SVGFEBlendElement> create(const QualifiedName&, Document&);
private:
SVGFEBlendElement(const QualifiedName&, Document&);
virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName) override;
virtual void svgAttributeChanged(const QualifiedName&) override;
virtual RefPtr<FilterEffect> build(SVGFilterBuilder*, Filter&) override;
BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGFEBlendElement)
DECLARE_ANIMATED_STRING(In1, in1)
DECLARE_ANIMATED_STRING(In2, in2)
DECLARE_ANIMATED_ENUMERATION(Mode, mode, BlendMode)
END_DECLARE_ANIMATED_PROPERTIES
};
}
#endif