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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) | 42 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) |
43 REGISTER_LOCAL_ANIMATED_PROPERTY(in2) | 43 REGISTER_LOCAL_ANIMATED_PROPERTY(in2) |
44 REGISTER_LOCAL_ANIMATED_PROPERTY(svgOperator) | 44 REGISTER_LOCAL_ANIMATED_PROPERTY(svgOperator) |
45 REGISTER_LOCAL_ANIMATED_PROPERTY(k1) | 45 REGISTER_LOCAL_ANIMATED_PROPERTY(k1) |
46 REGISTER_LOCAL_ANIMATED_PROPERTY(k2) | 46 REGISTER_LOCAL_ANIMATED_PROPERTY(k2) |
47 REGISTER_LOCAL_ANIMATED_PROPERTY(k3) | 47 REGISTER_LOCAL_ANIMATED_PROPERTY(k3) |
48 REGISTER_LOCAL_ANIMATED_PROPERTY(k4) | 48 REGISTER_LOCAL_ANIMATED_PROPERTY(k4) |
49 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | 49 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) |
50 END_REGISTER_ANIMATED_PROPERTIES | 50 END_REGISTER_ANIMATED_PROPERTIES |
51 | 51 |
52 inline SVGFECompositeElement::SVGFECompositeElement(const QualifiedName& tagName
, Document* document) | 52 inline SVGFECompositeElement::SVGFECompositeElement(const QualifiedName& tagName
, Document& document) |
53 : SVGFilterPrimitiveStandardAttributes(tagName, document) | 53 : SVGFilterPrimitiveStandardAttributes(tagName, document) |
54 , m_svgOperator(FECOMPOSITE_OPERATOR_OVER) | 54 , m_svgOperator(FECOMPOSITE_OPERATOR_OVER) |
55 { | 55 { |
56 ASSERT(hasTagName(SVGNames::feCompositeTag)); | 56 ASSERT(hasTagName(SVGNames::feCompositeTag)); |
57 ScriptWrappable::init(this); | 57 ScriptWrappable::init(this); |
58 registerAnimatedPropertiesForSVGFECompositeElement(); | 58 registerAnimatedPropertiesForSVGFECompositeElement(); |
59 } | 59 } |
60 | 60 |
61 PassRefPtr<SVGFECompositeElement> SVGFECompositeElement::create(const QualifiedN
ame& tagName, Document* document) | 61 PassRefPtr<SVGFECompositeElement> SVGFECompositeElement::create(const QualifiedN
ame& tagName, Document& document) |
62 { | 62 { |
63 return adoptRef(new SVGFECompositeElement(tagName, document)); | 63 return adoptRef(new SVGFECompositeElement(tagName, document)); |
64 } | 64 } |
65 | 65 |
66 bool SVGFECompositeElement::isSupportedAttribute(const QualifiedName& attrName) | 66 bool SVGFECompositeElement::isSupportedAttribute(const QualifiedName& attrName) |
67 { | 67 { |
68 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 68 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
69 if (supportedAttributes.isEmpty()) { | 69 if (supportedAttributes.isEmpty()) { |
70 supportedAttributes.add(SVGNames::inAttr); | 70 supportedAttributes.add(SVGNames::inAttr); |
71 supportedAttributes.add(SVGNames::in2Attr); | 71 supportedAttributes.add(SVGNames::in2Attr); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 | 180 |
181 RefPtr<FilterEffect> effect = FEComposite::create(filter, svgOperatorCurrent
Value(), k1CurrentValue(), k2CurrentValue(), k3CurrentValue(), k4CurrentValue())
; | 181 RefPtr<FilterEffect> effect = FEComposite::create(filter, svgOperatorCurrent
Value(), k1CurrentValue(), k2CurrentValue(), k3CurrentValue(), k4CurrentValue())
; |
182 FilterEffectVector& inputEffects = effect->inputEffects(); | 182 FilterEffectVector& inputEffects = effect->inputEffects(); |
183 inputEffects.reserveCapacity(2); | 183 inputEffects.reserveCapacity(2); |
184 inputEffects.append(input1); | 184 inputEffects.append(input1); |
185 inputEffects.append(input2); | 185 inputEffects.append(input2); |
186 return effect.release(); | 186 return effect.release(); |
187 } | 187 } |
188 | 188 |
189 } | 189 } |
OLD | NEW |