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 27 matching lines...) Expand all Loading... |
38 entries.append(std::make_pair(FEBLEND_MODE_MULTIPLY, "multiply")); | 38 entries.append(std::make_pair(FEBLEND_MODE_MULTIPLY, "multiply")); |
39 entries.append(std::make_pair(FEBLEND_MODE_SCREEN, "screen")); | 39 entries.append(std::make_pair(FEBLEND_MODE_SCREEN, "screen")); |
40 entries.append(std::make_pair(FEBLEND_MODE_DARKEN, "darken")); | 40 entries.append(std::make_pair(FEBLEND_MODE_DARKEN, "darken")); |
41 entries.append(std::make_pair(FEBLEND_MODE_LIGHTEN, "lighten")); | 41 entries.append(std::make_pair(FEBLEND_MODE_LIGHTEN, "lighten")); |
42 } | 42 } |
43 return entries; | 43 return entries; |
44 } | 44 } |
45 | 45 |
46 // Animated property definitions | 46 // Animated property definitions |
47 | 47 |
48 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEBlendElement) | |
49 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | |
50 END_REGISTER_ANIMATED_PROPERTIES | |
51 | 48 |
52 inline SVGFEBlendElement::SVGFEBlendElement(Document& document) | 49 inline SVGFEBlendElement::SVGFEBlendElement(Document& document) |
53 : SVGFilterPrimitiveStandardAttributes(SVGNames::feBlendTag, document) | 50 : SVGFilterPrimitiveStandardAttributes(SVGNames::feBlendTag, document) |
54 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) | 51 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) |
55 , m_in2(SVGAnimatedString::create(this, SVGNames::in2Attr, SVGString::create
())) | 52 , m_in2(SVGAnimatedString::create(this, SVGNames::in2Attr, SVGString::create
())) |
56 , m_mode(SVGAnimatedEnumeration<BlendModeType>::create(this, SVGNames::modeA
ttr, FEBLEND_MODE_NORMAL)) | 53 , m_mode(SVGAnimatedEnumeration<BlendModeType>::create(this, SVGNames::modeA
ttr, FEBLEND_MODE_NORMAL)) |
57 { | 54 { |
58 ScriptWrappable::init(this); | 55 ScriptWrappable::init(this); |
59 addToPropertyMap(m_in1); | 56 addToPropertyMap(m_in1); |
60 addToPropertyMap(m_in2); | 57 addToPropertyMap(m_in2); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 137 |
141 RefPtr<FilterEffect> effect = FEBlend::create(filter, m_mode->currentValue()
->enumValue()); | 138 RefPtr<FilterEffect> effect = FEBlend::create(filter, m_mode->currentValue()
->enumValue()); |
142 FilterEffectVector& inputEffects = effect->inputEffects(); | 139 FilterEffectVector& inputEffects = effect->inputEffects(); |
143 inputEffects.reserveCapacity(2); | 140 inputEffects.reserveCapacity(2); |
144 inputEffects.append(input1); | 141 inputEffects.append(input1); |
145 inputEffects.append(input2); | 142 inputEffects.append(input2); |
146 return effect.release(); | 143 return effect.release(); |
147 } | 144 } |
148 | 145 |
149 } | 146 } |
OLD | NEW |