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 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 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 28 matching lines...) Expand all Loading... |
39 : SVGFilterPrimitiveStandardAttributes(SVGNames::feOffsetTag, document) | 39 : SVGFilterPrimitiveStandardAttributes(SVGNames::feOffsetTag, document) |
40 , m_dx(SVGAnimatedNumber::create(this, SVGNames::dxAttr, SVGNumber::create()
)) | 40 , m_dx(SVGAnimatedNumber::create(this, SVGNames::dxAttr, SVGNumber::create()
)) |
41 , m_dy(SVGAnimatedNumber::create(this, SVGNames::dyAttr, SVGNumber::create()
)) | 41 , m_dy(SVGAnimatedNumber::create(this, SVGNames::dyAttr, SVGNumber::create()
)) |
42 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) | 42 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) |
43 { | 43 { |
44 ScriptWrappable::init(this); | 44 ScriptWrappable::init(this); |
45 | 45 |
46 addToPropertyMap(m_dx); | 46 addToPropertyMap(m_dx); |
47 addToPropertyMap(m_dy); | 47 addToPropertyMap(m_dy); |
48 addToPropertyMap(m_in1); | 48 addToPropertyMap(m_in1); |
49 registerAnimatedPropertiesForSVGFEOffsetElement(); | |
50 } | 49 } |
51 | 50 |
52 PassRefPtr<SVGFEOffsetElement> SVGFEOffsetElement::create(Document& document) | 51 PassRefPtr<SVGFEOffsetElement> SVGFEOffsetElement::create(Document& document) |
53 { | 52 { |
54 return adoptRef(new SVGFEOffsetElement(document)); | 53 return adoptRef(new SVGFEOffsetElement(document)); |
55 } | 54 } |
56 | 55 |
57 bool SVGFEOffsetElement::isSupportedAttribute(const QualifiedName& attrName) | 56 bool SVGFEOffsetElement::isSupportedAttribute(const QualifiedName& attrName) |
58 { | 57 { |
59 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 58 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 108 |
110 if (!input1) | 109 if (!input1) |
111 return nullptr; | 110 return nullptr; |
112 | 111 |
113 RefPtr<FilterEffect> effect = FEOffset::create(filter, m_dx->currentValue()-
>value(), m_dy->currentValue()->value()); | 112 RefPtr<FilterEffect> effect = FEOffset::create(filter, m_dx->currentValue()-
>value(), m_dy->currentValue()->value()); |
114 effect->inputEffects().append(input1); | 113 effect->inputEffects().append(input1); |
115 return effect.release(); | 114 return effect.release(); |
116 } | 115 } |
117 | 116 |
118 } | 117 } |
OLD | NEW |