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 | 38 |
39 inline SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(Document& document) | 39 inline SVGFEGaussianBlurElement::SVGFEGaussianBlurElement(Document& document) |
40 : SVGFilterPrimitiveStandardAttributes(SVGNames::feGaussianBlurTag, document
) | 40 : SVGFilterPrimitiveStandardAttributes(SVGNames::feGaussianBlurTag, document
) |
41 , m_stdDeviation(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::std
DeviationAttr, 0, 0)) | 41 , m_stdDeviation(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::std
DeviationAttr, 0, 0)) |
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_stdDeviation); | 46 addToPropertyMap(m_stdDeviation); |
47 addToPropertyMap(m_in1); | 47 addToPropertyMap(m_in1); |
48 registerAnimatedPropertiesForSVGFEGaussianBlurElement(); | |
49 } | 48 } |
50 | 49 |
51 PassRefPtr<SVGFEGaussianBlurElement> SVGFEGaussianBlurElement::create(Document&
document) | 50 PassRefPtr<SVGFEGaussianBlurElement> SVGFEGaussianBlurElement::create(Document&
document) |
52 { | 51 { |
53 return adoptRef(new SVGFEGaussianBlurElement(document)); | 52 return adoptRef(new SVGFEGaussianBlurElement(document)); |
54 } | 53 } |
55 | 54 |
56 void SVGFEGaussianBlurElement::setStdDeviation(float x, float y) | 55 void SVGFEGaussianBlurElement::setStdDeviation(float x, float y) |
57 { | 56 { |
58 stdDeviationX()->baseValue()->setValue(x); | 57 stdDeviationX()->baseValue()->setValue(x); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 114 |
116 if (stdDeviationX()->currentValue()->value() < 0 || stdDeviationY()->current
Value()->value() < 0) | 115 if (stdDeviationX()->currentValue()->value() < 0 || stdDeviationY()->current
Value()->value() < 0) |
117 return nullptr; | 116 return nullptr; |
118 | 117 |
119 RefPtr<FilterEffect> effect = FEGaussianBlur::create(filter, stdDeviationX()
->currentValue()->value(), stdDeviationY()->currentValue()->value()); | 118 RefPtr<FilterEffect> effect = FEGaussianBlur::create(filter, stdDeviationX()
->currentValue()->value(), stdDeviationY()->currentValue()->value()); |
120 effect->inputEffects().append(input1); | 119 effect->inputEffects().append(input1); |
121 return effect.release(); | 120 return effect.release(); |
122 } | 121 } |
123 | 122 |
124 } | 123 } |
OLD | NEW |