OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Oliver Hunt <oliver@nerget.com> | 2 * Copyright (C) 2006 Oliver Hunt <oliver@nerget.com> |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 25 matching lines...) Expand all Loading... |
36 entries.append(std::make_pair(CHANNEL_R, "R")); | 36 entries.append(std::make_pair(CHANNEL_R, "R")); |
37 entries.append(std::make_pair(CHANNEL_G, "G")); | 37 entries.append(std::make_pair(CHANNEL_G, "G")); |
38 entries.append(std::make_pair(CHANNEL_B, "B")); | 38 entries.append(std::make_pair(CHANNEL_B, "B")); |
39 entries.append(std::make_pair(CHANNEL_A, "A")); | 39 entries.append(std::make_pair(CHANNEL_A, "A")); |
40 } | 40 } |
41 return entries; | 41 return entries; |
42 } | 42 } |
43 | 43 |
44 // Animated property definitions | 44 // Animated property definitions |
45 | 45 |
46 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEDisplacementMapElement) | |
47 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | |
48 END_REGISTER_ANIMATED_PROPERTIES | |
49 | 46 |
50 inline SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(Document& docume
nt) | 47 inline SVGFEDisplacementMapElement::SVGFEDisplacementMapElement(Document& docume
nt) |
51 : SVGFilterPrimitiveStandardAttributes(SVGNames::feDisplacementMapTag, docum
ent) | 48 : SVGFilterPrimitiveStandardAttributes(SVGNames::feDisplacementMapTag, docum
ent) |
52 , m_scale(SVGAnimatedNumber::create(this, SVGNames::scaleAttr, SVGNumber::cr
eate(0))) | 49 , m_scale(SVGAnimatedNumber::create(this, SVGNames::scaleAttr, SVGNumber::cr
eate(0))) |
53 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) | 50 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) |
54 , m_in2(SVGAnimatedString::create(this, SVGNames::in2Attr, SVGString::create
())) | 51 , m_in2(SVGAnimatedString::create(this, SVGNames::in2Attr, SVGString::create
())) |
55 , m_xChannelSelector(SVGAnimatedEnumeration<ChannelSelectorType>::create(thi
s, SVGNames::xChannelSelectorAttr, CHANNEL_A)) | 52 , m_xChannelSelector(SVGAnimatedEnumeration<ChannelSelectorType>::create(thi
s, SVGNames::xChannelSelectorAttr, CHANNEL_A)) |
56 , m_yChannelSelector(SVGAnimatedEnumeration<ChannelSelectorType>::create(thi
s, SVGNames::yChannelSelectorAttr, CHANNEL_A)) | 53 , m_yChannelSelector(SVGAnimatedEnumeration<ChannelSelectorType>::create(thi
s, SVGNames::yChannelSelectorAttr, CHANNEL_A)) |
57 { | 54 { |
58 ScriptWrappable::init(this); | 55 ScriptWrappable::init(this); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 150 |
154 RefPtr<FilterEffect> effect = FEDisplacementMap::create(filter, m_xChannelSe
lector->currentValue()->enumValue(), m_yChannelSelector->currentValue()->enumVal
ue(), m_scale->currentValue()->value()); | 151 RefPtr<FilterEffect> effect = FEDisplacementMap::create(filter, m_xChannelSe
lector->currentValue()->enumValue(), m_yChannelSelector->currentValue()->enumVal
ue(), m_scale->currentValue()->value()); |
155 FilterEffectVector& inputEffects = effect->inputEffects(); | 152 FilterEffectVector& inputEffects = effect->inputEffects(); |
156 inputEffects.reserveCapacity(2); | 153 inputEffects.reserveCapacity(2); |
157 inputEffects.append(input1); | 154 inputEffects.append(input1); |
158 inputEffects.append(input2); | 155 inputEffects.append(input2); |
159 return effect.release(); | 156 return effect.release(); |
160 } | 157 } |
161 | 158 |
162 } | 159 } |
OLD | NEW |