| 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 25 matching lines...) Expand all Loading... |
| 36 entries.append(std::make_pair(FEBLEND_MODE_UNKNOWN, emptyString())); | 36 entries.append(std::make_pair(FEBLEND_MODE_UNKNOWN, emptyString())); |
| 37 entries.append(std::make_pair(FEBLEND_MODE_NORMAL, "normal")); | 37 entries.append(std::make_pair(FEBLEND_MODE_NORMAL, "normal")); |
| 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 | |
| 47 | |
| 48 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEBlendElement) | |
| 49 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | |
| 50 END_REGISTER_ANIMATED_PROPERTIES | |
| 51 | |
| 52 inline SVGFEBlendElement::SVGFEBlendElement(Document& document) | 46 inline SVGFEBlendElement::SVGFEBlendElement(Document& document) |
| 53 : SVGFilterPrimitiveStandardAttributes(SVGNames::feBlendTag, document) | 47 : SVGFilterPrimitiveStandardAttributes(SVGNames::feBlendTag, document) |
| 54 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) | 48 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) |
| 55 , m_in2(SVGAnimatedString::create(this, SVGNames::in2Attr, SVGString::create
())) | 49 , m_in2(SVGAnimatedString::create(this, SVGNames::in2Attr, SVGString::create
())) |
| 56 , m_mode(SVGAnimatedEnumeration<BlendModeType>::create(this, SVGNames::modeA
ttr, FEBLEND_MODE_NORMAL)) | 50 , m_mode(SVGAnimatedEnumeration<BlendModeType>::create(this, SVGNames::modeA
ttr, FEBLEND_MODE_NORMAL)) |
| 57 { | 51 { |
| 58 ScriptWrappable::init(this); | 52 ScriptWrappable::init(this); |
| 59 addToPropertyMap(m_in1); | 53 addToPropertyMap(m_in1); |
| 60 addToPropertyMap(m_in2); | 54 addToPropertyMap(m_in2); |
| 61 addToPropertyMap(m_mode); | 55 addToPropertyMap(m_mode); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 134 |
| 141 RefPtr<FilterEffect> effect = FEBlend::create(filter, m_mode->currentValue()
->enumValue()); | 135 RefPtr<FilterEffect> effect = FEBlend::create(filter, m_mode->currentValue()
->enumValue()); |
| 142 FilterEffectVector& inputEffects = effect->inputEffects(); | 136 FilterEffectVector& inputEffects = effect->inputEffects(); |
| 143 inputEffects.reserveCapacity(2); | 137 inputEffects.reserveCapacity(2); |
| 144 inputEffects.append(input1); | 138 inputEffects.append(input1); |
| 145 inputEffects.append(input2); | 139 inputEffects.append(input2); |
| 146 return effect.release(); | 140 return effect.release(); |
| 147 } | 141 } |
| 148 | 142 |
| 149 } | 143 } |
| OLD | NEW |