| 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 23 matching lines...) Expand all Loading... |
| 34 DEFINE_ANIMATED_NUMBER(SVGFEOffsetElement, SVGNames::dxAttr, Dx, dx) | 34 DEFINE_ANIMATED_NUMBER(SVGFEOffsetElement, SVGNames::dxAttr, Dx, dx) |
| 35 DEFINE_ANIMATED_NUMBER(SVGFEOffsetElement, SVGNames::dyAttr, Dy, dy) | 35 DEFINE_ANIMATED_NUMBER(SVGFEOffsetElement, SVGNames::dyAttr, Dy, dy) |
| 36 | 36 |
| 37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEOffsetElement) | 37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEOffsetElement) |
| 38 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) | 38 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) |
| 39 REGISTER_LOCAL_ANIMATED_PROPERTY(dx) | 39 REGISTER_LOCAL_ANIMATED_PROPERTY(dx) |
| 40 REGISTER_LOCAL_ANIMATED_PROPERTY(dy) | 40 REGISTER_LOCAL_ANIMATED_PROPERTY(dy) |
| 41 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | 41 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) |
| 42 END_REGISTER_ANIMATED_PROPERTIES | 42 END_REGISTER_ANIMATED_PROPERTIES |
| 43 | 43 |
| 44 inline SVGFEOffsetElement::SVGFEOffsetElement(const QualifiedName& tagName, Docu
ment* document) | 44 inline SVGFEOffsetElement::SVGFEOffsetElement(const QualifiedName& tagName, Docu
ment& document) |
| 45 : SVGFilterPrimitiveStandardAttributes(tagName, document) | 45 : SVGFilterPrimitiveStandardAttributes(tagName, document) |
| 46 { | 46 { |
| 47 ASSERT(hasTagName(SVGNames::feOffsetTag)); | 47 ASSERT(hasTagName(SVGNames::feOffsetTag)); |
| 48 ScriptWrappable::init(this); | 48 ScriptWrappable::init(this); |
| 49 registerAnimatedPropertiesForSVGFEOffsetElement(); | 49 registerAnimatedPropertiesForSVGFEOffsetElement(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 PassRefPtr<SVGFEOffsetElement> SVGFEOffsetElement::create(const QualifiedName& t
agName, Document* document) | 52 PassRefPtr<SVGFEOffsetElement> SVGFEOffsetElement::create(const QualifiedName& t
agName, Document& document) |
| 53 { | 53 { |
| 54 return adoptRef(new SVGFEOffsetElement(tagName, document)); | 54 return adoptRef(new SVGFEOffsetElement(tagName, document)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 bool SVGFEOffsetElement::isSupportedAttribute(const QualifiedName& attrName) | 57 bool SVGFEOffsetElement::isSupportedAttribute(const QualifiedName& attrName) |
| 58 { | 58 { |
| 59 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 59 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| 60 if (supportedAttributes.isEmpty()) { | 60 if (supportedAttributes.isEmpty()) { |
| 61 supportedAttributes.add(SVGNames::inAttr); | 61 supportedAttributes.add(SVGNames::inAttr); |
| 62 supportedAttributes.add(SVGNames::dxAttr); | 62 supportedAttributes.add(SVGNames::dxAttr); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 if (!input1) | 114 if (!input1) |
| 115 return 0; | 115 return 0; |
| 116 | 116 |
| 117 RefPtr<FilterEffect> effect = FEOffset::create(filter, dxCurrentValue(), dyC
urrentValue()); | 117 RefPtr<FilterEffect> effect = FEOffset::create(filter, dxCurrentValue(), dyC
urrentValue()); |
| 118 effect->inputEffects().append(input1); | 118 effect->inputEffects().append(input1); |
| 119 return effect.release(); | 119 return effect.release(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 } | 122 } |
| OLD | NEW |