OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 23 matching lines...) Expand all Loading... |
34 DEFINE_ANIMATED_STRING(SVGFEBlendElement, SVGNames::in2Attr, In2, in2) | 34 DEFINE_ANIMATED_STRING(SVGFEBlendElement, SVGNames::in2Attr, In2, in2) |
35 DEFINE_ANIMATED_ENUMERATION(SVGFEBlendElement, SVGNames::modeAttr, Mode, mode, B
lendModeType) | 35 DEFINE_ANIMATED_ENUMERATION(SVGFEBlendElement, SVGNames::modeAttr, Mode, mode, B
lendModeType) |
36 | 36 |
37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEBlendElement) | 37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEBlendElement) |
38 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) | 38 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) |
39 REGISTER_LOCAL_ANIMATED_PROPERTY(in2) | 39 REGISTER_LOCAL_ANIMATED_PROPERTY(in2) |
40 REGISTER_LOCAL_ANIMATED_PROPERTY(mode) | 40 REGISTER_LOCAL_ANIMATED_PROPERTY(mode) |
41 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | 41 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) |
42 END_REGISTER_ANIMATED_PROPERTIES | 42 END_REGISTER_ANIMATED_PROPERTIES |
43 | 43 |
44 inline SVGFEBlendElement::SVGFEBlendElement(const QualifiedName& tagName, Docume
nt* document) | 44 inline SVGFEBlendElement::SVGFEBlendElement(const QualifiedName& tagName, Docume
nt& document) |
45 : SVGFilterPrimitiveStandardAttributes(tagName, document) | 45 : SVGFilterPrimitiveStandardAttributes(tagName, document) |
46 , m_mode(FEBLEND_MODE_NORMAL) | 46 , m_mode(FEBLEND_MODE_NORMAL) |
47 { | 47 { |
48 ASSERT(hasTagName(SVGNames::feBlendTag)); | 48 ASSERT(hasTagName(SVGNames::feBlendTag)); |
49 ScriptWrappable::init(this); | 49 ScriptWrappable::init(this); |
50 registerAnimatedPropertiesForSVGFEBlendElement(); | 50 registerAnimatedPropertiesForSVGFEBlendElement(); |
51 } | 51 } |
52 | 52 |
53 PassRefPtr<SVGFEBlendElement> SVGFEBlendElement::create(const QualifiedName& tag
Name, Document* document) | 53 PassRefPtr<SVGFEBlendElement> SVGFEBlendElement::create(const QualifiedName& tag
Name, Document& document) |
54 { | 54 { |
55 return adoptRef(new SVGFEBlendElement(tagName, document)); | 55 return adoptRef(new SVGFEBlendElement(tagName, document)); |
56 } | 56 } |
57 | 57 |
58 bool SVGFEBlendElement::isSupportedAttribute(const QualifiedName& attrName) | 58 bool SVGFEBlendElement::isSupportedAttribute(const QualifiedName& attrName) |
59 { | 59 { |
60 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 60 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
61 if (supportedAttributes.isEmpty()) { | 61 if (supportedAttributes.isEmpty()) { |
62 supportedAttributes.add(SVGNames::modeAttr); | 62 supportedAttributes.add(SVGNames::modeAttr); |
63 supportedAttributes.add(SVGNames::inAttr); | 63 supportedAttributes.add(SVGNames::inAttr); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 135 |
136 RefPtr<FilterEffect> effect = FEBlend::create(filter, modeCurrentValue()); | 136 RefPtr<FilterEffect> effect = FEBlend::create(filter, modeCurrentValue()); |
137 FilterEffectVector& inputEffects = effect->inputEffects(); | 137 FilterEffectVector& inputEffects = effect->inputEffects(); |
138 inputEffects.reserveCapacity(2); | 138 inputEffects.reserveCapacity(2); |
139 inputEffects.append(input1); | 139 inputEffects.append(input1); |
140 inputEffects.append(input2); | 140 inputEffects.append(input2); |
141 return effect.release(); | 141 return effect.release(); |
142 } | 142 } |
143 | 143 |
144 } | 144 } |
OLD | NEW |