SVGFEBlendElement.h [plain text]
#pragma once
#include "GraphicsTypes.h"
#include "SVGAnimatedEnumeration.h"
#include "SVGFilterPrimitiveStandardAttributes.h"
namespace WebCore {
template<>
struct SVGPropertyTraits<BlendMode> {
static unsigned highestEnumValue() { return BlendModeLuminosity; }
static String toString(BlendMode type)
{
if (type < BlendModePlusDarker)
return blendModeName(type);
return emptyString();
}
};
class SVGFEBlendElement final : public SVGFilterPrimitiveStandardAttributes {
WTF_MAKE_ISO_ALLOCATED(SVGFEBlendElement);
public:
static Ref<SVGFEBlendElement> create(const QualifiedName&, Document&);
private:
SVGFEBlendElement(const QualifiedName&, Document&);
void parseAttribute(const QualifiedName&, const AtomicString&) override;
bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& attrName) override;
void svgAttributeChanged(const QualifiedName&) override;
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
};
}